Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerClient ¶
type ContainerClient interface { CheckRegistryConnection(ctx context.Context, conf RegistryBasicConf) ContainerError CreateVolume(ctx context.Context, volumeName string) ContainerError RemoveVolume(ctx context.Context, volumeName string) ContainerError StartContainer(ctx context.Context, conf ContainerStartConf) (ContainerInstance, ContainerError) RemoveContainer(ctx context.Context, id string, options ContainerRemoveOptions) ContainerError FollowLogs(ctx context.Context, containerId string, logWriter io.Writer) (ContainerError, chan interface{}) CreateNetwork(ctx context.Context, name string) (ContainerError, string) DeleteNetwork(ctx context.Context, id string) ContainerError }
encapsulate all operations in containers
var DockerClient ContainerClient = &dockerClient{ dockerApiVersion: configuration.DockerApiVersion, clientOpts: func(cli *client.Client) error { return nil }, }
with clientOpts, it will be now simple to override option to docker client
type ContainerEnvs ¶
func (ContainerEnvs) ToArray ¶
func (e ContainerEnvs) ToArray() []string
type ContainerError ¶
type ContainerError interface { Error() string ErrorType() ContainerErrorType }
type ContainerErrorType ¶
type ContainerErrorType int
const ( BadCredentials ContainerErrorType = 1 + iota RegistryNotFound OtherError )
type ContainerInstance ¶
type ContainerInstance struct { Id string Ip string WaitForStop func(chan interface{}) ContainerResult }
type ContainerRemoveOptions ¶
type ContainerResult ¶
type ContainerResult struct { Status ContainerStatus ErrMsg string }
type ContainerStartConf ¶
type ContainerStatus ¶
type ContainerStatus string
const ( Success ContainerStatus = "success" Error ContainerStatus = "error" Canceled ContainerStatus = "canceled" )
type RegistryBasicConf ¶
Click to show internal directories.
Click to hide internal directories.