aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-05-10 13:58:20 -0700
committerJhon Honce <jhonce@redhat.com>2021-05-10 14:13:15 -0700
commit8ad40a85d5eab3eea888708e242f32354e799822 (patch)
tree6d3bd8c09ea3eab3ba14c2b81f924684150eb89d /libpod
parent76c857704053a6c6ee1e2ed1900b549d399f967d (diff)
downloadpodman-8ad40a85d5eab3eea888708e242f32354e799822.tar.gz
podman-8ad40a85d5eab3eea888708e242f32354e799822.tar.bz2
podman-8ad40a85d5eab3eea888708e242f32354e799822.zip
Add host.serviceIsRemote to podman info results
Developers asked for a deterministic field to verify if podman is running via API or linked directly to libpod library. $ podman info --format '{{.Host.ServiceIsRemote}}' false $ podman-remote info --format '{{.Host.ServiceIsRemote}}' true $ podman --remote info --format '{{.Host.ServiceIsRemote}}' true * docs/conf.py formatted via black Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/info.go51
1 files changed, 27 insertions, 24 deletions
diff --git a/libpod/define/info.go b/libpod/define/info.go
index 87935be2d..c9d6877c0 100644
--- a/libpod/define/info.go
+++ b/libpod/define/info.go
@@ -21,31 +21,34 @@ type SecurityInfo struct {
SELinuxEnabled bool `json:"selinuxEnabled"`
}
-//HostInfo describes the libpod host
+// HostInfo describes the libpod host
type HostInfo struct {
- Arch string `json:"arch"`
- BuildahVersion string `json:"buildahVersion"`
- CgroupManager string `json:"cgroupManager"`
- CGroupsVersion string `json:"cgroupVersion"`
- Conmon *ConmonInfo `json:"conmon"`
- CPUs int `json:"cpus"`
- Distribution DistributionInfo `json:"distribution"`
- EventLogger string `json:"eventLogger"`
- Hostname string `json:"hostname"`
- IDMappings IDMappings `json:"idMappings,omitempty"`
- Kernel string `json:"kernel"`
- MemFree int64 `json:"memFree"`
- MemTotal int64 `json:"memTotal"`
- OCIRuntime *OCIRuntimeInfo `json:"ociRuntime"`
- OS string `json:"os"`
- RemoteSocket *RemoteSocket `json:"remoteSocket,omitempty"`
- RuntimeInfo map[string]interface{} `json:"runtimeInfo,omitempty"`
- Security SecurityInfo `json:"security"`
- Slirp4NetNS SlirpInfo `json:"slirp4netns,omitempty"`
- SwapFree int64 `json:"swapFree"`
- SwapTotal int64 `json:"swapTotal"`
- Uptime string `json:"uptime"`
- Linkmode string `json:"linkmode"`
+ Arch string `json:"arch"`
+ BuildahVersion string `json:"buildahVersion"`
+ CgroupManager string `json:"cgroupManager"`
+ CGroupsVersion string `json:"cgroupVersion"`
+ Conmon *ConmonInfo `json:"conmon"`
+ CPUs int `json:"cpus"`
+ Distribution DistributionInfo `json:"distribution"`
+ EventLogger string `json:"eventLogger"`
+ Hostname string `json:"hostname"`
+ IDMappings IDMappings `json:"idMappings,omitempty"`
+ Kernel string `json:"kernel"`
+ MemFree int64 `json:"memFree"`
+ MemTotal int64 `json:"memTotal"`
+ OCIRuntime *OCIRuntimeInfo `json:"ociRuntime"`
+ OS string `json:"os"`
+ // RemoteSocket returns the UNIX domain socket the Podman service is listening on
+ RemoteSocket *RemoteSocket `json:"remoteSocket,omitempty"`
+ RuntimeInfo map[string]interface{} `json:"runtimeInfo,omitempty"`
+ // ServiceIsRemote is true when the podman/libpod service is remote to the client
+ ServiceIsRemote bool `json:"serviceIsRemote"`
+ Security SecurityInfo `json:"security"`
+ Slirp4NetNS SlirpInfo `json:"slirp4netns,omitempty"`
+ SwapFree int64 `json:"swapFree"`
+ SwapTotal int64 `json:"swapTotal"`
+ Uptime string `json:"uptime"`
+ Linkmode string `json:"linkmode"`
}
// RemoteSocket describes information about the API socket