Documentation
¶
Overview ¶
Package docker provides a Docker backend implementation for container operations.
Index ¶
- type DockerBackend
- func (b *DockerBackend) BackendType() core.BackendType
- func (b *DockerBackend) Capabilities() core.BackendCapabilities
- func (b *DockerBackend) Clean(ctx context.Context, age time.Duration, filter filters.Args) error
- func (b *DockerBackend) Create(ctx context.Context, config *core.ContainerConfig) (core.ContainerID, error)
- func (b *DockerBackend) HealthCheck(ctx context.Context) error
- func (b *DockerBackend) Image(name string) core.Image
- func (b *DockerBackend) Inspect(ctx context.Context, id core.ContainerID) (*core.ContainerInfo, error)
- func (b *DockerBackend) Logs(ctx context.Context, id core.ContainerID) (io.ReadCloser, error)
- func (b *DockerBackend) Remove(ctx context.Context, id core.ContainerID) error
- func (b *DockerBackend) Start(ctx context.Context, id core.ContainerID) error
- func (b *DockerBackend) Stop(ctx context.Context, id core.ContainerID) error
- func (b *DockerBackend) Wait(ctx context.Context, id core.ContainerID) error
- type DockerBuildInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerBackend ¶
type DockerBackend struct {
// contains filtered or unexported fields
}
DockerBackend implements the core.Backend interface for Docker
func New ¶
func New(config core.DockerConfig) (*DockerBackend, error)
New creates a new Docker backend
func (*DockerBackend) BackendType ¶
func (b *DockerBackend) BackendType() core.BackendType
BackendType returns core.BackendTypeDocker
func (*DockerBackend) Capabilities ¶
func (b *DockerBackend) Capabilities() core.BackendCapabilities
Capabilities returns the backend capabilities
func (*DockerBackend) Create ¶
func (b *DockerBackend) Create(ctx context.Context, config *core.ContainerConfig) (core.ContainerID, error)
Create creates a new container
func (*DockerBackend) HealthCheck ¶
func (b *DockerBackend) HealthCheck(ctx context.Context) error
HealthCheck performs a health check on the backend
func (*DockerBackend) Image ¶
func (b *DockerBackend) Image(name string) core.Image
Image returns an Image interface for the given image name
func (*DockerBackend) Inspect ¶
func (b *DockerBackend) Inspect(ctx context.Context, id core.ContainerID) (*core.ContainerInfo, error)
Inspect returns information about a container
func (*DockerBackend) Logs ¶
func (b *DockerBackend) Logs(ctx context.Context, id core.ContainerID) (io.ReadCloser, error)
Logs returns logs for a container
func (*DockerBackend) Remove ¶
func (b *DockerBackend) Remove(ctx context.Context, id core.ContainerID) error
Remove removes a container
func (*DockerBackend) Start ¶
func (b *DockerBackend) Start(ctx context.Context, id core.ContainerID) error
Start starts a container
func (*DockerBackend) Stop ¶
func (b *DockerBackend) Stop(ctx context.Context, id core.ContainerID) error
Stop stops a container
func (*DockerBackend) Wait ¶
func (b *DockerBackend) Wait(ctx context.Context, id core.ContainerID) error
Wait waits for a container to exit
type DockerBuildInput ¶
type DockerBuildInput struct {
Context io.Reader // Build context (tarball)
Dockerfile string // Dockerfile path within context (default: "Dockerfile")
}
DockerBuildInput represents build input for Docker backend
func (*DockerBuildInput) Type ¶
func (d *DockerBuildInput) Type() core.BackendType
Type returns the backend type this input is for