Documentation
¶
Overview ¶
Package docker implements a container manager for docker orchestration.
Index ¶
- type Manager
- func (m *Manager) ContainerList(ctx context.Context, all bool, limit int32, srv options.ListContainerStreamer, ...) error
- func (m *Manager) ContainerLogs(ctx context.Context, instance string, srv options.LogStreamer, ...) error
- func (m *Manager) ContainerPull(ctx context.Context, image, tag string, opts ...options.Option) error
- func (m *Manager) ContainerPush(ctx context.Context, file *os.File, opts ...options.Option) (string, string, error)
- func (m *Manager) ContainerRemove(ctx context.Context, image, tag string, opts ...options.Option) error
- func (m *Manager) ContainerStart(ctx context.Context, image, tag, cmd string, opts ...options.Option) (string, error)
- func (m *Manager) ContainerStop(ctx context.Context, instance string, opts ...options.Option) error
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Stop(ctx context.Context) error
- func (m *Manager) VolumeCreate(ctx context.Context, name string, driver cpb.Driver, opts ...options.Option) (string, error)
- func (m *Manager) VolumeList(ctx context.Context, srv options.ListVolumeStreamer, opts ...options.Option) error
- func (m *Manager) VolumeRemove(ctx context.Context, name string, opts ...options.Option) error
- type Vacuum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a docker container orchestration manager.
func (*Manager) ContainerList ¶
func (m *Manager) ContainerList(ctx context.Context, all bool, limit int32, srv options.ListContainerStreamer, opts ...options.Option) error
ContainerList lists the containers present on the target.
func (*Manager) ContainerLogs ¶
func (m *Manager) ContainerLogs(ctx context.Context, instance string, srv options.LogStreamer, opts ...options.Option) error
ContainerLogs fetches the logs from a container. It can optionally follow the logs and send them back to the client.
func (*Manager) ContainerPull ¶
func (m *Manager) ContainerPull(ctx context.Context, image, tag string, opts ...options.Option) error
ContainerPull pull a container from a registry to this containerz server. Based on the options specified it can tag the container, stream responses to the client, and perform registry authentication.
func (*Manager) ContainerPush ¶
func (m *Manager) ContainerPush(ctx context.Context, file *os.File, opts ...options.Option) (string, string, error)
ContainerPush pushes the container file to the containerz server. It can optionally tag the container, otherwise it will use the name and tag provided in the file.
func (*Manager) ContainerRemove ¶
func (m *Manager) ContainerRemove(ctx context.Context, image, tag string, opts ...options.Option) error
ContainerRemove removes an image provided it is not related to a running container. Otherwise, it returns an error.
func (*Manager) ContainerStart ¶
func (m *Manager) ContainerStart(ctx context.Context, image, tag, cmd string, opts ...options.Option) (string, error)
ContainerStart starts a container provided the image exists and that the ports requested are not currently in use. TODO(alshabib) consider adding restart policy to containerz proto
func (*Manager) ContainerStop ¶
ContainerStop stops a container. If the Force option is set and a timeout is specified in the context, the contains if forcefully terminated after that timeout. If the Force option is set but no timeout is provided the container's StopTimeout value is used, if set, otherwise the engine default. If the Force option is not set, no forceful termination is performed.
func (*Manager) VolumeCreate ¶
func (m *Manager) VolumeCreate(ctx context.Context, name string, driver cpb.Driver, opts ...options.Option) (string, error)
VolumeCreate creates a volume with the provided name using the driver specified. The driver default to LOCAL if it is not specified. The name is autogenerated by the target if it is empty.