Versions in this module Expand all Collapse all v1 v1.0.2 Jun 28, 2024 v1.0.1 Jun 28, 2024 v1.0.0 Jun 27, 2024 Changes in this version + const STDALL + var Action = Actions + var ContainerActions = []ContainerAction + var ParenthesisRe = regexp.MustCompile(`\(([a-zA-Z]+)\)`) + func CreateClients(args argsType.Args) map[string]Client + type Actions struct + PULL ContainerAction + RESTART ContainerAction + START ContainerAction + STOP ContainerAction + type Client interface + ContainerActions func(action ContainerAction, containerID string) error + ContainerLogs func(context.Context, string, *time.Time, StdType) (io.ReadCloser, error) + ContainerLogsBetweenDates func(context.Context, string, time.Time, time.Time, StdType) (io.ReadCloser, error) + Events func(context.Context, chan<- ContainerEvent) error + FindContainer func(string) (Container, error) + Host func() *Host + IsSwarmMode func() bool + ListContainers func() ([]Container, error) + Ping func(context.Context) (types.Ping, error) + SystemInfo func() system.Info + func NewClient(cli DockerCLI, filters filters.Args, host *Host) Client + func NewClientWithFilters(f map[string][]string) (Client, error) + func NewClientWithTLSAndFilter(f map[string][]string, host Host) (Client, error) + type Container struct + Command string + Created time.Time + Health string + Host string + ID string + Image string + ImageID string + Labels map[string]string + Name string + Names []string + StartedAt *time.Time + State string + Status string + Tty bool + func (c *Container) GetDescription() string + func (c *Container) GetDescriptionFull() string + type ContainerAction string + const ActionPull + const ActionRestart + const ActionStart + const ActionStop + type ContainerEvent struct + ActorID string + Host string + Name string + type ContainerStore struct + func NewContainerStore(ctx context.Context, client Client) *ContainerStore + func (s *ContainerStore) Client() Client + func (s *ContainerStore) List() ([]Container, error) + func (s *ContainerStore) Subscribe(ctx context.Context, events chan ContainerEvent) + func (s *ContainerStore) SubscribeNewContainers(ctx context.Context, containers chan Container) + func (s *ContainerStore) Unsubscribe(ctx context.Context) + type DockerCLI interface + ContainerInspect func(ctx context.Context, containerID string) (types.ContainerJSON, error) + ContainerList func(context.Context, container.ListOptions) ([]types.Container, error) + ContainerLogs func(context.Context, string, container.LogsOptions) (io.ReadCloser, error) + ContainerRestart func(ctx context.Context, containerID string, options container.StopOptions) error + ContainerStart func(ctx context.Context, containerID string, options container.StartOptions) error + ContainerStats func(ctx context.Context, containerID string, stream bool) (container.StatsResponse, error) + ContainerStop func(ctx context.Context, containerID string, options container.StopOptions) error + Events func(context.Context, events.ListOptions) (<-chan events.Message, <-chan error) + ImageInspectWithRaw func(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) + ImagePull func(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error) + Info func(ctx context.Context) (system.Info, error) + Ping func(ctx context.Context) (types.Ping, error) + type Host struct + CACertPath string + CertPath string + ID string + KeyPath string + MemTotal int64 + NCPU int + Name string + URL *url.URL + ValidCerts bool + func ParseConnection(connection string) (Host, error) + func (h *Host) GetDescription() string + type StdType int + const STDERR + const STDOUT + const UNKNOWN + func (s StdType) String() string