Documentation ¶
Index ¶
Constants ¶
View Source
const ( WildcardAlias = "*" NSProxy = "proxy" NSHomePage = "homepage" LabelAliases = NSProxy + ".aliases" LabelExclude = NSProxy + ".exclude" LabelIdleTimeout = NSProxy + ".idle_timeout" LabelWakeTimeout = NSProxy + ".wake_timeout" LabelStopMethod = NSProxy + ".stop_method" LabelStopTimeout = NSProxy + ".stop_timeout" LabelStopSignal = NSProxy + ".stop_signal" )
Variables ¶
This section is empty.
Functions ¶
func ApplyLabel ¶
func ApplyLabel[T any](obj *T, l *Label) E.NestedError
Apply applies the value of a Label to the corresponding field in the given object.
Parameters:
- obj: a pointer to the object to which the Label value will be applied.
- l: a pointer to the Label containing the attribute and value to be applied.
Returns:
- error: an error if the field does not exist.
func CloseAllClients ¶
func CloseAllClients()
func IsErrConnectionFailed ¶
Types ¶
type Client ¶
func ConnectClient ¶
func ConnectClient(host string) (Client, E.NestedError)
ConnectClient creates a new Docker client connection to the specified host.
Returns existing client if available.
Parameters:
- host: the host to connect to (either a URL or common.DockerHostFromEnv).
Returns:
- Client: the Docker client connection.
- error: an error if the connection failed.
type ClientInfo ¶
func GetClientInfo ¶
func GetClientInfo(clientHost string, getContainer bool) (*ClientInfo, E.NestedError)
type Container ¶
type Container struct { DockerHost string `json:"docker_host" yaml:"-"` ContainerName string `json:"container_name" yaml:"-"` ContainerID string `json:"container_id" yaml:"-"` ImageName string `json:"image_name" yaml:"-"` Labels map[string]string `json:"labels" yaml:"-"` PublicPortMapping PortMapping `json:"public_ports" yaml:"-"` // non-zero publicPort:types.Port PrivatePortMapping PortMapping `json:"private_ports" yaml:"-"` // privatePort:types.Port PublicIP string `json:"public_ip" yaml:"-"` PrivateIP string `json:"private_ip" yaml:"-"` NetworkMode string `json:"network_mode" yaml:"-"` Aliases []string `json:"aliases" yaml:"-"` IsExcluded bool `json:"is_excluded" yaml:"-"` IsExplicit bool `json:"is_explicit" yaml:"-"` IsDatabase bool `json:"is_database" yaml:"-"` IdleTimeout string `json:"idle_timeout" yaml:"-"` WakeTimeout string `json:"wake_timeout" yaml:"-"` StopMethod string `json:"stop_method" yaml:"-"` StopTimeout string `json:"stop_timeout" yaml:"-"` // stop_method = "stop" only StopSignal string `json:"stop_signal" yaml:"-"` // stop_method = "stop" | "kill" only Running bool `json:"running" yaml:"-"` // contains filtered or unexported fields }
type Label ¶
Formats:
- namespace.attribute
- namespace.target.attribute
- namespace.target.attribute.namespace2.attribute
func ParseLabel ¶
func ParseLabel(label string, value string) (*Label, E.NestedError)
type NestedLabelMap ¶
type NestedLabelMap map[string]U.SerializedObject
Formats:
- namespace.attribute
- namespace.target.attribute
- namespace.target.attribute.namespace2.attribute
type PortMapping ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.