mirror of
https://github.com/containers/podman.git
synced 2025-10-26 02:35:43 +08:00
The following methods should support streaming requests from the client: * GetContainerLogs A reference for a python stream implementation can be found here: https://github.com/varlink/python/blob/master/varlink/tests/test_orgexamplemore.py#L29-L42 Signed-off-by: baude <bbaude@redhat.com> Closes: #724 Approved by: mheon
31 lines
798 B
Go
31 lines
798 B
Go
package varlinkapi
|
|
|
|
import (
|
|
"github.com/projectatomic/libpod/cmd/podman/varlink"
|
|
"github.com/projectatomic/libpod/libpod"
|
|
)
|
|
|
|
// GetVersion ...
|
|
func (i *LibpodAPI) GetVersion(call ioprojectatomicpodman.VarlinkCall) error {
|
|
versionInfo, err := libpod.GetVersion()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return call.ReplyGetVersion(ioprojectatomicpodman.Version{
|
|
Version: versionInfo.Version,
|
|
Go_version: versionInfo.GoVersion,
|
|
Git_commit: versionInfo.GitCommit,
|
|
Built: versionInfo.Built,
|
|
Os_arch: versionInfo.OsArch,
|
|
})
|
|
}
|
|
|
|
// Ping returns a simple string "OK" response for clients to make sure
|
|
// the service is working.
|
|
func (i *LibpodAPI) Ping(call ioprojectatomicpodman.VarlinkCall) error {
|
|
return call.ReplyPing(ioprojectatomicpodman.StringResponse{
|
|
Message: "OK",
|
|
})
|
|
}
|