Documentation
¶
Index ¶
Constants ¶
View Source
const STDALL = STDOUT | STDERR
Variables ¶
View Source
var ErrBadHeader = fmt.Errorf("unable to read header")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Host() *Host ListContainers() ([]Container, error) FindContainer(string) (Container, error) ContainerLogs(context.Context, string, string, StdType) (io.ReadCloser, error) ContainerLogsRange(context.Context, string, time.Time, time.Time, StdType) (io.ReadCloser, error) ContainerActions(action string, containerID string) error Events(context.Context, chan<- ContainerEvent) Ping(context.Context) (types.Ping, error) }
func NewLocalClientWithOpts ¶ added in v1.0.2
type Container ¶
type Container struct { ID string `json:"id"` Names []string `json:"names"` Name string `json:"name"` Image string `json:"image"` ImageID string `json:"imageId"` Command string `json:"command"` Created int64 `json:"created"` State string `json:"state"` Status string `json:"status"` Health string `json:"health,omitempty"` Host string `json:"host,omitempty"` Tty bool `json:"-"` Labels map[string]string `json:"labels,omitempty"` }
type ContainerEvent ¶
type DockerCLI ¶
type DockerCLI interface { ContainerList(context.Context, container.ListOptions) ([]types.Container, error) ContainerLogs(context.Context, string, container.LogsOptions) (io.ReadCloser, error) Events(context.Context, types.EventsOptions) (<-chan events.Message, <-chan error) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) ContainerStats(ctx context.Context, containerID string, stream bool) (types.ContainerStats, error) Ping(ctx context.Context) (types.Ping, error) ContainerStart(ctx context.Context, containerID string, options container.StartOptions) error ContainerStop(ctx context.Context, containerID string, options container.StopOptions) error ContainerRestart(ctx context.Context, containerID string, options container.StopOptions) error }
type Host ¶
type Host struct { Name string `json:"name"` ID string `json:"id"` URL *url.URL `json:"-"` CertPath string `json:"-"` CACertPath string `json:"-"` KeyPath string `json:"-"` ValidCerts bool `json:"-"` }
func ParseConnection ¶
Click to show internal directories.
Click to hide internal directories.