Documentation
¶
Index ¶
Constants ¶
View Source
const ( WildcardAlias = "*" NSProxy = "proxy" 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" LabelStartEndpoint = NSProxy + ".start_endpoint" )
Variables ¶
View Source
var DummyContainer = new(Container)
View Source
var ErrInvalidLabel = E.New("invalid label")
Functions ¶
func IsErrConnectionFailed ¶
Types ¶
type Container ¶
type Container struct {
DockerHost string `json:"docker_host"`
ContainerName string `json:"container_name"`
ContainerID string `json:"container_id"`
ImageName string `json:"image_name"`
Labels map[string]string `json:"-"`
PublicPortMapping PortMapping `json:"public_ports"` // non-zero publicPort:types.Port
PrivatePortMapping PortMapping `json:"private_ports"` // privatePort:types.Port
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip"`
NetworkMode string `json:"network_mode"`
Aliases []string `json:"aliases"`
IsExcluded bool `json:"is_excluded"`
IsExplicit bool `json:"is_explicit"`
IsDatabase bool `json:"is_database"`
IdleTimeout string `json:"idle_timeout,omitempty"`
WakeTimeout string `json:"wake_timeout,omitempty"`
StopMethod string `json:"stop_method,omitempty"`
StopTimeout string `json:"stop_timeout,omitempty"` // stop_method = "stop" only
StopSignal string `json:"stop_signal,omitempty"` // stop_method = "stop" | "kill" only
StartEndpoint string `json:"start_endpoint,omitempty"`
Running bool `json:"running"`
// contains filtered or unexported fields
}
type PortMapping ¶
type SharedClient ¶
type SharedClient struct {
// contains filtered or unexported fields
}
func ConnectClient ¶
func ConnectClient(host string) (*SharedClient, error)
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.
func (*SharedClient) Close ¶
func (c *SharedClient) Close()
if the client is still referenced, this is no-op.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.