Documentation ¶
Index ¶
- func CliCmd(ctx context.Context, args ...string) ([]byte, error)
- func GetComposeName(n string) string
- func MatchComposeName(h, n string) bool
- type CliCmdError
- type ComposeConfig
- type ComposeService
- type Inspect
- type InspectConfig
- type InspectHostConfig
- type InspectHostConfigMount
- type InspectHostConfigPortBinding
- type InspectHostConfigRestartPolicy
- type InspectMount
- type InspectNetwork
- type InspectNetworkSettings
- type InspectNetworkSettingsPort
- type InspectState
- type Inspects
- type Ps
- type Pss
- type Service
- type ServiceLocator
- type ServiceLocatorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetComposeName ¶
func MatchComposeName ¶
Types ¶
type CliCmdError ¶
type CliCmdError struct {
Message string
}
func (CliCmdError) Error ¶
func (e CliCmdError) Error() string
type ComposeConfig ¶
type ComposeConfig struct { Version string `json:"version"` Services map[string]*ComposeService X map[string]any `json:"-"` }
func ReadComposeConfig ¶
func ReadComposeConfig(paths []string) (*ComposeConfig, error)
type ComposeService ¶
type Inspect ¶
type Inspect struct { Id string `json:"Id"` Created time.Time `json:"Created"` Path string `json:"Path"` Args []string `json:"Args"` State InspectState `json:"State"` Image string `json:"Image"` ResolvConfPath string `json:"ResolvConfPath"` HostnamePath string `json:"HostnamePath"` HostsPath string `json:"HostsPath"` LogPath string `json:"LogPath"` Name string `json:"Name"` RestartCount int `json:"RestartCount"` Driver string `json:"Driver"` Platform string `json:"Platform"` MountLabel string `json:"MountLabel"` ProcessLabel string `json:"ProcessLabel"` AppArmorProfile string `json:"AppArmorProfile"` ExecIDs any `json:"ExecIDs"` HostConfig InspectHostConfig `json:"HostConfig"` Mounts []InspectMount `json:"Mounts"` Config InspectConfig `json:"Config"` NetworkSettings InspectNetworkSettings `json:"NetworkSettings"` X map[string]any `json:"-"` }
type InspectConfig ¶
type InspectConfig struct { Hostname string `json:"Hostname"` Domainname string `json:"Domainname"` User string `json:"User"` AttachStdin bool `json:"AttachStdin"` AttachStdout bool `json:"AttachStdout"` AttachStderr bool `json:"AttachStderr"` ExposedPorts map[string]any `json:"ExposedPorts"` Tty bool `json:"Tty"` OpenStdin bool `json:"OpenStdin"` StdinOnce bool `json:"StdinOnce"` Env []string `json:"Env"` Cmd []string `json:"Cmd"` Image string `json:"Image"` Volumes map[string]any `json:"Volumes"` WorkingDir string `json:"WorkingDir"` Entrypoint []string `json:"Entrypoint"` OnBuild any `json:"OnBuild"` Labels map[string]string `json:"Labels"` StopSignal string `json:"StopSignal"` X map[string]any `json:"-"` }
type InspectHostConfig ¶
type InspectHostConfig struct { Binds []any `json:"Binds"` NetworkMode string `json:"NetworkMode"` PortBindings map[string][]InspectHostConfigPortBinding `json:"PortBindings"` RestartPolicy InspectHostConfigRestartPolicy `json:"RestartPolicy"` AutoRemove bool `json:"AutoRemove"` VolumeDriver string `json:"VolumeDriver"` VolumesFrom any `json:"VolumesFrom"` CapAdd any `json:"CapAdd"` CapDrop any `json:"CapDrop"` CgroupnsMode string `json:"CgroupnsMode"` Dns []any `json:"Dns"` DnsOptions []any `json:"DnsOptions"` DnsSearch []any `json:"DnsSearch"` ExtraHosts []any `json:"ExtraHosts"` GroupAdd any `json:"GroupAdd"` IpcMode string `json:"IpcMode"` Cgroup string `json:"Cgroup"` Links any `json:"Links"` OomScoreAdj int `json:"OomScoreAdj"` PidMode string `json:"PidMode"` Privileged bool `json:"Privileged"` PublishAllPorts bool `json:"PublishAllPorts"` ReadonlyRootfs bool `json:"ReadonlyRootfs"` SecurityOpt any `json:"SecurityOpt"` UtsMode string `json:"UTSMode"` UsernsMode string `json:"UsernsMode"` ShmSize int `json:"ShmSize"` Runtime string `json:"Runtime"` ConsoleSize []int `json:"ConsoleSize"` Isolation string `json:"Isolation"` Memory int `json:"Memory"` NanoCpus int `json:"NanoCpus"` CgroupParent string `json:"CgroupParent"` BlkioWeight int `json:"BlkioWeight"` BlkioWeightDevice any `json:"BlkioWeightDevice"` BlkioDeviceReadBps any `json:"BlkioDeviceReadBps"` BlkioDeviceWriteBps any `json:"BlkioDeviceWriteBps"` BlkioDeviceReadIops any `json:"BlkioDeviceReadIOps"` BlkioDeviceWriteIops any `json:"BlkioDeviceWriteIOps"` CpuPeriod int `json:"CpuPeriod"` CpuQuota int `json:"CpuQuota"` CpuRealtimePeriod int `json:"CpuRealtimePeriod"` CpuRealtimeRuntime int `json:"CpuRealtimeRuntime"` CpusetCpus string `json:"CpusetCpus"` CpusetMems string `json:"CpusetMems"` Devices any `json:"Devices"` DeviceCgroupRules any `json:"DeviceCgroupRules"` DeviceRequests any `json:"DeviceRequests"` KernelMemory int `json:"KernelMemory"` KernelMemoryTcp int `json:"KernelMemoryTCP"` MemoryReservation int `json:"MemoryReservation"` MemorySwap int `json:"MemorySwap"` MemorySwappiness any `json:"MemorySwappiness"` OomKillDisable any `json:"OomKillDisable"` PidsLimit any `json:"PidsLimit"` Ulimits any `json:"Ulimits"` CpuCount int `json:"CpuCount"` CpuPercent int `json:"CpuPercent"` IoMaximumIops int `json:"IOMaximumIOps"` IoMaximumBandwidth int `json:"IOMaximumBandwidth"` Mounts []InspectHostConfigMount `json:"Mounts"` MaskedPaths []string `json:"MaskedPaths"` ReadonlyPaths []string `json:"ReadonlyPaths"` X map[string]any `json:"-"` }
type InspectHostConfigMount ¶
type InspectMount ¶
type InspectNetwork ¶
type InspectNetwork struct { IpamConfig any `json:"IPAMConfig"` Links any `json:"Links"` Aliases []string `json:"Aliases"` NetworkId string `json:"NetworkID"` EndpointId string `json:"EndpointID"` Gateway string `json:"Gateway"` IpAddress string `json:"IPAddress"` IpPrefixLen int `json:"IPPrefixLen"` Ipv6Gateway string `json:"IPv6Gateway"` GlobalIpv6Address string `json:"GlobalIPv6Address"` GlobalIpv6PrefixLen int `json:"GlobalIPv6PrefixLen"` MacAddress string `json:"MacAddress"` DriverOpts any `json:"DriverOpts"` X map[string]any `json:"-"` }
type InspectNetworkSettings ¶
type InspectNetworkSettings struct { Bridge string `json:"Bridge"` SandboxID string `json:"SandboxID"` HairpinMode bool `json:"HairpinMode"` LinkLocalIpv6Address string `json:"LinkLocalIPv6Address"` LinkLocalIpv6PrefixLen int `json:"LinkLocalIPv6PrefixLen"` Ports map[string][]InspectNetworkSettingsPort `json:"Ports"` SandboxKey string `json:"SandboxKey"` SecondaryIpAddresses any `json:"SecondaryIPAddresses"` SecondaryIpv6Addresses any `json:"SecondaryIPv6Addresses"` EndpointID string `json:"EndpointID"` Gateway string `json:"Gateway"` GlobalIpv6Address string `json:"GlobalIPv6Address"` GlobalIpv6PrefixLen int `json:"GlobalIPv6PrefixLen"` IpAddress string `json:"IPAddress"` IpPrefixLen int `json:"IPPrefixLen"` Ipv6Gateway string `json:"IPv6Gateway"` MacAddress string `json:"MacAddress"` Networks map[string]InspectNetwork `json:"Networks"` X map[string]any `json:"-"` }
type InspectState ¶
type InspectState struct { Status string `json:"Status"` Running bool `json:"Running"` Paused bool `json:"Paused"` Restarting bool `json:"Restarting"` OomKilled bool `json:"OOMKilled"` Dead bool `json:"Dead"` Pid int `json:"Pid"` ExitCode int `json:"ExitCode"` Error string `json:"Error"` StartedAt time.Time `json:"StartedAt"` FinishedAt time.Time `json:"FinishedAt"` X map[string]any `json:"-"` }
type Ps ¶
type Ps struct { Command string `json:"Command"` CreatedAt string `json:"CreatedAt"` ID string `json:"ID"` Image string `json:"Image"` Labels string `json:"Labels"` LocalVolumes string `json:"LocalVolumes"` Mounts string `json:"Mounts"` Names string `json:"Names"` Networks string `json:"Networks"` Ports string `json:"Ports"` RunningFor string `json:"RunningFor"` Size string `json:"Size"` State string `json:"State"` Status string `json:"Status"` X map[string]any `json:"-"` }
type ServiceLocator ¶
type ServiceLocator struct {
// contains filtered or unexported fields
}
func NewServiceLocator ¶
func NewServiceLocator(cfg ServiceLocatorConfig) *ServiceLocator
func (*ServiceLocator) Compose ¶
func (sl *ServiceLocator) Compose() *ComposeConfig
func (*ServiceLocator) Inspects ¶
func (sl *ServiceLocator) Inspects() Inspects
func (*ServiceLocator) Locate ¶
func (sl *ServiceLocator) Locate(name string) *Service
func (*ServiceLocator) Pss ¶
func (sl *ServiceLocator) Pss() Pss
type ServiceLocatorConfig ¶
func DefaultServiceLocatorConfig ¶
func DefaultServiceLocatorConfig() ServiceLocatorConfig
Click to show internal directories.
Click to hide internal directories.