Documentation ¶
Index ¶
- type Docker
- func (docker *Docker) APIClient() (DockerClient, error)
- func (docker *Docker) Containers(ctx context.Context, path string, services ...string) (containers []types.Container, err error)
- func (docker *Docker) CreateNetwork(ctx context.Context, name string) (id string, exists bool, err error)
- func (docker *Docker) Ping(ctx context.Context) (types.Ping, error)
- type DockerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
func (*Docker) APIClient ¶
func (docker *Docker) APIClient() (DockerClient, error)
func (*Docker) Containers ¶
func (docker *Docker) Containers(ctx context.Context, path string, services ...string) (containers []types.Container, err error)
Containers loads the compose project at path, connects to the docker daemon, and then lists all containers belonging to the given services. If services is empty, all containers belonging to any service are returned.
func (*Docker) CreateNetwork ¶
func (docker *Docker) CreateNetwork(ctx context.Context, name string) (id string, exists bool, err error)
CreateNetwork creates a docker network with the given name unless it already exists. The new network will be of default type. exists indicates if the network already exists.
Click to show internal directories.
Click to hide internal directories.