Documentation ¶
Index ¶
- Constants
- Variables
- type ContainerBackend
- type ContainerCreateInput
- type ContainerCreateOutput
- type ContainerMount
- type ContainerMountType
- type ContainerResources
- type ContainerWaitResult
- type Docker
- func (backend *Docker) Close() error
- func (backend *Docker) ContainerCreate(ctx context.Context, input *ContainerCreateInput, name string) (*ContainerCreateOutput, error)
- func (backend *Docker) ContainerDelete(ctx context.Context, id string) error
- func (backend *Docker) ContainerStart(ctx context.Context, id string) error
- func (backend *Docker) ContainerWait(ctx context.Context, id string) (<-chan ContainerWaitResult, <-chan error)
- func (backend *Docker) ImageBuild(ctx context.Context, tarball io.Reader, input *ImageBuildInput) (<-chan string, <-chan error)
- func (backend *Docker) ImageDelete(ctx context.Context, reference string) error
- func (backend *Docker) ImageInspect(ctx context.Context, reference string) error
- func (backend *Docker) ImagePull(ctx context.Context, reference string) error
- func (backend *Docker) ImagePush(ctx context.Context, reference string) error
- func (backend *Docker) SystemInfo(ctx context.Context) (*SystemInfo, error)
- func (backend *Docker) VolumeCreate(ctx context.Context, name string) error
- func (backend *Docker) VolumeDelete(ctx context.Context, name string) error
- func (backend *Docker) VolumeInspect(ctx context.Context, name string) error
- type ImageBuildInput
- type Podman
- func (backend *Podman) Close() error
- func (backend *Podman) ContainerCreate(ctx context.Context, input *ContainerCreateInput, name string) (*ContainerCreateOutput, error)
- func (backend *Podman) ContainerDelete(ctx context.Context, id string) error
- func (backend *Podman) ContainerStart(ctx context.Context, id string) error
- func (backend *Podman) ContainerWait(ctx context.Context, id string) (<-chan ContainerWaitResult, <-chan error)
- func (backend *Podman) ImageBuild(ctx context.Context, tarball io.Reader, input *ImageBuildInput) (<-chan string, <-chan error)
- func (backend *Podman) ImageDelete(ctx context.Context, reference string) error
- func (backend *Podman) ImageInspect(ctx context.Context, reference string) error
- func (backend *Podman) ImagePull(ctx context.Context, reference string) error
- func (backend *Podman) ImagePush(ctx context.Context, reference string) error
- func (backend *Podman) SystemInfo(ctx context.Context) (*SystemInfo, error)
- func (backend *Podman) VolumeCreate(ctx context.Context, name string) error
- func (backend *Podman) VolumeDelete(ctx context.Context, name string) error
- func (backend *Podman) VolumeInspect(ctx context.Context, name string) error
- type SystemInfo
- type Unimplemented
- func (*Unimplemented) Close() error
- func (*Unimplemented) ContainerCreate(ctx context.Context, input *ContainerCreateInput, name string) (*ContainerCreateOutput, error)
- func (*Unimplemented) ContainerDelete(ctx context.Context, id string) error
- func (*Unimplemented) ContainerStart(ctx context.Context, id string) error
- func (*Unimplemented) ContainerWait(ctx context.Context, id string) (<-chan ContainerWaitResult, <-chan error)
- func (*Unimplemented) ImageBuild(ctx context.Context, tarball io.Reader, input *ImageBuildInput) (<-chan string, <-chan error)
- func (*Unimplemented) ImageDelete(ctx context.Context, reference string) error
- func (*Unimplemented) ImageInspect(ctx context.Context, reference string) error
- func (*Unimplemented) ImagePull(ctx context.Context, reference string) error
- func (*Unimplemented) ImagePush(ctx context.Context, reference string) error
- func (*Unimplemented) SystemInfo(ctx context.Context) (*SystemInfo, error)
- func (*Unimplemented) VolumeCreate(ctx context.Context, name string) error
- func (*Unimplemented) VolumeDelete(ctx context.Context, name string) error
- func (*Unimplemented) VolumeInspect(ctx context.Context, name string) error
Constants ¶
View Source
const ( BackendAuto = "auto" BackendDocker = "docker" BackendPodman = "podman" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrDone = errors.New("done") ErrNewFailed = errors.New("failed to create container backend") ErrBuildFailed = errors.New("failed to build image") ErrPushFailed = errors.New("failed to push container") ErrNotImplemented = errors.New("unimplemented container backend method") )
View Source
var ErrPodman = errors.New("Podman error")
Functions ¶
This section is empty.
Types ¶
type ContainerBackend ¶
type ContainerBackend interface { io.Closer ImagePull(ctx context.Context, reference string) error ImagePush(ctx context.Context, reference string) error ImageBuild(ctx context.Context, tarball io.Reader, input *ImageBuildInput) (<-chan string, <-chan error) ImageInspect(ctx context.Context, reference string) error ImageDelete(ctx context.Context, reference string) error VolumeCreate(ctx context.Context, name string) error VolumeInspect(ctx context.Context, name string) error VolumeDelete(ctx context.Context, name string) error ContainerCreate(ctx context.Context, input *ContainerCreateInput, name string) (*ContainerCreateOutput, error) ContainerStart(ctx context.Context, id string) error ContainerWait(ctx context.Context, id string) (<-chan ContainerWaitResult, <-chan error) ContainerDelete(ctx context.Context, id string) error SystemInfo(ctx context.Context) (*SystemInfo, error) }
func New ¶
func New(name string) (ContainerBackend, error)
func NewDocker ¶
func NewDocker() (ContainerBackend, error)
func NewPodman ¶
func NewPodman() (ContainerBackend, error)
type ContainerCreateInput ¶
type ContainerCreateInput struct { Image string Entrypoint []string Command []string Env map[string]string Mounts []ContainerMount Network string Resources ContainerResources DisableSELinux bool }
type ContainerCreateOutput ¶
type ContainerCreateOutput struct {
ID string
}
type ContainerMount ¶
type ContainerMount struct { Type ContainerMountType Source string Target string ReadOnly bool }
type ContainerMountType ¶
type ContainerMountType int
const ( MountTypeBind ContainerMountType = iota MountTypeVolume )
type ContainerResources ¶
type ContainerWaitResult ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func (*Docker) ContainerCreate ¶
func (backend *Docker) ContainerCreate( ctx context.Context, input *ContainerCreateInput, name string, ) (*ContainerCreateOutput, error)
func (*Docker) ContainerDelete ¶
func (*Docker) ContainerStart ¶
func (*Docker) ContainerWait ¶
func (*Docker) ImageBuild ¶
func (*Docker) ImageDelete ¶ added in v0.21.0
func (*Docker) ImageInspect ¶
func (*Docker) SystemInfo ¶
func (backend *Docker) SystemInfo(ctx context.Context) (*SystemInfo, error)
func (*Docker) VolumeCreate ¶
func (*Docker) VolumeDelete ¶
type ImageBuildInput ¶
type Podman ¶
type Podman struct {
// contains filtered or unexported fields
}
func (*Podman) ContainerCreate ¶
func (backend *Podman) ContainerCreate( ctx context.Context, input *ContainerCreateInput, name string, ) (*ContainerCreateOutput, error)
func (*Podman) ContainerDelete ¶
func (*Podman) ContainerStart ¶
func (*Podman) ContainerWait ¶
func (*Podman) ImageBuild ¶
func (*Podman) ImageDelete ¶ added in v0.21.0
func (*Podman) ImageInspect ¶
func (*Podman) SystemInfo ¶
func (backend *Podman) SystemInfo(ctx context.Context) (*SystemInfo, error)
func (*Podman) VolumeCreate ¶
func (*Podman) VolumeDelete ¶
type SystemInfo ¶
type Unimplemented ¶
type Unimplemented struct{}
func (*Unimplemented) Close ¶
func (*Unimplemented) Close() error
func (*Unimplemented) ContainerCreate ¶
func (*Unimplemented) ContainerCreate( ctx context.Context, input *ContainerCreateInput, name string, ) (*ContainerCreateOutput, error)
func (*Unimplemented) ContainerDelete ¶
func (*Unimplemented) ContainerDelete(ctx context.Context, id string) error
func (*Unimplemented) ContainerStart ¶
func (*Unimplemented) ContainerStart(ctx context.Context, id string) error
func (*Unimplemented) ContainerWait ¶
func (*Unimplemented) ContainerWait(ctx context.Context, id string) (<-chan ContainerWaitResult, <-chan error)
func (*Unimplemented) ImageBuild ¶
func (*Unimplemented) ImageBuild( ctx context.Context, tarball io.Reader, input *ImageBuildInput, ) (<-chan string, <-chan error)
func (*Unimplemented) ImageDelete ¶ added in v0.21.0
func (*Unimplemented) ImageDelete(ctx context.Context, reference string) error
func (*Unimplemented) ImageInspect ¶
func (*Unimplemented) ImageInspect(ctx context.Context, reference string) error
func (*Unimplemented) ImagePull ¶
func (*Unimplemented) ImagePull(ctx context.Context, reference string) error
func (*Unimplemented) ImagePush ¶ added in v0.21.0
func (*Unimplemented) ImagePush(ctx context.Context, reference string) error
func (*Unimplemented) SystemInfo ¶
func (*Unimplemented) SystemInfo(ctx context.Context) (*SystemInfo, error)
func (*Unimplemented) VolumeCreate ¶
func (*Unimplemented) VolumeCreate(ctx context.Context, name string) error
func (*Unimplemented) VolumeDelete ¶
func (*Unimplemented) VolumeDelete(ctx context.Context, name string) error
func (*Unimplemented) VolumeInspect ¶
func (*Unimplemented) VolumeInspect(ctx context.Context, name string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.