Documentation ¶
Index ¶
- type ConfigService
- type ContainerAdapter
- func (c *ContainerAdapter) Create(ctx context.Context, options core.ContainerCreateOptions) (core.Container, error)
- func (c *ContainerAdapter) Exec(ctx context.Context, options core.ContainerExecOptions) error
- func (c *ContainerAdapter) Find(ctx context.Context, options core.ContainerFindOptions) (core.Container, error)
- func (c *ContainerAdapter) FindAll(ctx context.Context, options core.ContainerFindOptions) ([]core.Container, error)
- func (c *ContainerAdapter) Inspect(ctx context.Context, ID string) (core.ContainerInspectResult, error)
- func (c *ContainerAdapter) Start(ctx context.Context, ID string) error
- func (c *ContainerAdapter) Stop(ctx context.Context, ID string) error
- type ContainerFn
- type Docker
- func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, ...) (container.ContainerCreateCreatedBody, error)
- func (d *Docker) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
- func (d *Docker) ContainerExecCreate(ctx context.Context, id string, config types.ExecConfig) (types.IDResponse, error)
- func (d *Docker) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
- func (d *Docker) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
- func (d *Docker) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
- func (d *Docker) ContainerStart(ctx context.Context, cID string, options types.ContainerStartOptions) error
- func (d *Docker) ContainerStop(ctx context.Context, cID string, t *time.Duration) error
- func (d *Docker) ContainerWait(ctx context.Context, contID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error)
- type ImageAdapter
- type ImageFn
- type Nothing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigService ¶
type ConfigService struct { CommandFn func(cmd string, cf *core.Config) *core.CommandConfig SaveFn func(cf *core.Config, opts core.ConfigSaveOptions) error CreateAliasFileFn func() (core.Path, error) CreateBinFileFn func(cmd string) (core.Path, error) }
func NewConfigService ¶
func NewConfigService() *ConfigService
func (*ConfigService) Command ¶
func (c *ConfigService) Command(cmd string, cf *core.Config) *core.CommandConfig
func (*ConfigService) CreateAliasFile ¶
func (c *ConfigService) CreateAliasFile() (core.Path, error)
func (*ConfigService) CreateBinFile ¶
func (c *ConfigService) CreateBinFile(cmd string) (core.Path, error)
func (*ConfigService) Save ¶
func (c *ConfigService) Save(cf *core.Config, opts core.ConfigSaveOptions) error
type ContainerAdapter ¶
type ContainerAdapter struct { CreateFn func(ctx context.Context, options core.ContainerCreateOptions) (core.Container, error) StartFn func(ctx context.Context, ID string) error StopFn func(ctx context.Context, ID string) error ExecFn func(ctx context.Context, options core.ContainerExecOptions) error InspectFn func(ctx context.Context, ID string) (core.ContainerInspectResult, error) FindFn func(ctx context.Context, options core.ContainerFindOptions) (core.Container, error) FindAllFn func(ctx context.Context, options core.ContainerFindOptions) ([]core.Container, error) }
func NewContainerAdapter ¶
func NewContainerAdapter(fns ...ContainerFn) *ContainerAdapter
func (*ContainerAdapter) Create ¶
func (c *ContainerAdapter) Create(ctx context.Context, options core.ContainerCreateOptions) (core.Container, error)
func (*ContainerAdapter) Exec ¶
func (c *ContainerAdapter) Exec(ctx context.Context, options core.ContainerExecOptions) error
func (*ContainerAdapter) Find ¶
func (c *ContainerAdapter) Find(ctx context.Context, options core.ContainerFindOptions) (core.Container, error)
func (*ContainerAdapter) FindAll ¶
func (c *ContainerAdapter) FindAll(ctx context.Context, options core.ContainerFindOptions) ([]core.Container, error)
func (*ContainerAdapter) Inspect ¶
func (c *ContainerAdapter) Inspect(ctx context.Context, ID string) (core.ContainerInspectResult, error)
type ContainerFn ¶
type ContainerFn func(*ContainerAdapter) *ContainerAdapter
func ContainerAdapterWithCreate ¶
func ContainerAdapterWithCreate(ID string) ContainerFn
func ContainerAdapterWithFind ¶
func ContainerAdapterWithFind(ID string) ContainerFn
func ContainerAdapterWithStart ¶
func ContainerAdapterWithStart() ContainerFn
type Docker ¶
type Docker struct { ContainerCreateFn func(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error) ContainerStartFn func(ctx context.Context, cID string, options types.ContainerStartOptions) error ContainerStopFn func(ctx context.Context, containerID string, timeout *time.Duration) error ContainerListFn func(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) ContainerExecCreateFn func(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) ContainerExecAttachFn func(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) ContainerExecInspectFn func(ctx context.Context, execID string) (types.ContainerExecInspect, error) ContainerWaitFn func(ctx context.Context, contID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) ContainerExecResizeFn func(ctx context.Context, execID string, options types.ResizeOptions) error }
func (*Docker) ContainerCreate ¶
func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error)
func (*Docker) ContainerExecAttach ¶
func (d *Docker) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
func (*Docker) ContainerExecCreate ¶
func (d *Docker) ContainerExecCreate(ctx context.Context, id string, config types.ExecConfig) (types.IDResponse, error)
func (*Docker) ContainerExecInspect ¶
func (*Docker) ContainerExecResize ¶
func (*Docker) ContainerList ¶
func (*Docker) ContainerStart ¶
func (*Docker) ContainerStop ¶
func (*Docker) ContainerWait ¶
func (d *Docker) ContainerWait(ctx context.Context, contID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error)
type ImageAdapter ¶
type ImageAdapter struct { FindFn func(ctx context.Context, image string) ([]core.Image, error) PullFn func(ctx context.Context, image string) error }
func NewImageAdapter ¶
func NewImageAdapter(fns ...ImageFn) *ImageAdapter
type ImageFn ¶
type ImageFn func(*ImageAdapter) *ImageAdapter
func ImageAdapterWithFind ¶
func ImageAdapterWithPull ¶
Click to show internal directories.
Click to hide internal directories.