wrapper

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerEngineHandler

type ContainerEngineHandler interface {
	ListNetworks(ctx context.Context) ([]model.Network, error)
	ListContainers(ctx context.Context, filter model.ContainerFilter) ([]model.Container, error)
	ListImages(ctx context.Context, filter model.ImageFilter) ([]model.Image, error)
	ListVolumes(ctx context.Context, filter model.VolumeFilter) ([]model.Volume, error)
	NetworkInfo(ctx context.Context, id string) (model.Network, error)
	NetworkCreate(ctx context.Context, net model.Network) (string, error)
	NetworkRemove(ctx context.Context, id string) error
	ContainerInfo(ctx context.Context, id string) (model.Container, error)
	ContainerCreate(ctx context.Context, container model.Container) (id string, err error)
	ContainerRemove(ctx context.Context, id string, force bool) error
	ContainerStart(ctx context.Context, id string) error
	ContainerStop(ctx context.Context, id string) error
	ContainerRestart(ctx context.Context, id string) error
	ContainerLog(ctx context.Context, id string, logOptions model.LogFilter) (io.ReadCloser, error)
	ContainerExec(ctx context.Context, id string, execOpt model.ExecConfig) error
	ImageInfo(ctx context.Context, id string) (model.Image, error)
	ImagePull(ctx context.Context, id string) error
	ImageRemove(ctx context.Context, id string) error
	VolumeInfo(ctx context.Context, id string) (model.Volume, error)
	VolumeCreate(ctx context.Context, vol model.Volume) (string, error)
	VolumeRemove(ctx context.Context, id string, force bool) error
}

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

func New

func New(ceHandler ContainerEngineHandler, jobHandler job_hdl.JobHandler, srvInfoHandler srv_info_hdl.SrvInfoHandler) *Wrapper

func (*Wrapper) AddImage

func (a *Wrapper) AddImage(ctx context.Context, img string) (string, error)

func (*Wrapper) CancelJob

func (a *Wrapper) CancelJob(ctx context.Context, id string) error

func (*Wrapper) ContainerExec

func (a *Wrapper) ContainerExec(ctx context.Context, id string, exeConf model.ExecConfig) (string, error)

func (*Wrapper) CreateContainer

func (a *Wrapper) CreateContainer(ctx context.Context, container model.Container) (string, error)

func (*Wrapper) CreateNetwork

func (a *Wrapper) CreateNetwork(ctx context.Context, net model.Network) (string, error)

func (*Wrapper) CreateVolume

func (a *Wrapper) CreateVolume(ctx context.Context, vol model.Volume) (string, error)

func (*Wrapper) GetContainer

func (a *Wrapper) GetContainer(ctx context.Context, id string) (model.Container, error)

func (*Wrapper) GetContainerLog

func (a *Wrapper) GetContainerLog(ctx context.Context, id string, logOptions model.LogFilter) (io.ReadCloser, error)

func (*Wrapper) GetContainers

func (a *Wrapper) GetContainers(ctx context.Context, filter model.ContainerFilter) ([]model.Container, error)

func (*Wrapper) GetImage

func (a *Wrapper) GetImage(ctx context.Context, id string) (model.Image, error)

func (*Wrapper) GetImages

func (a *Wrapper) GetImages(ctx context.Context, filter model.ImageFilter) ([]model.Image, error)

func (*Wrapper) GetJob

func (a *Wrapper) GetJob(ctx context.Context, id string) (job_hdl_lib.Job, error)

func (*Wrapper) GetJobs

func (a *Wrapper) GetJobs(ctx context.Context, filter job_hdl_lib.JobFilter) ([]job_hdl_lib.Job, error)

func (*Wrapper) GetNetwork

func (a *Wrapper) GetNetwork(ctx context.Context, id string) (model.Network, error)

func (*Wrapper) GetNetworks

func (a *Wrapper) GetNetworks(ctx context.Context) ([]model.Network, error)

func (*Wrapper) GetSrvInfo

func (a *Wrapper) GetSrvInfo(_ context.Context) srv_info_lib.SrvInfo

func (*Wrapper) GetVolume

func (a *Wrapper) GetVolume(ctx context.Context, id string) (model.Volume, error)

func (*Wrapper) GetVolumes

func (a *Wrapper) GetVolumes(ctx context.Context, filter model.VolumeFilter) ([]model.Volume, error)

func (*Wrapper) RemoveContainer

func (a *Wrapper) RemoveContainer(ctx context.Context, id string, force bool) error

func (*Wrapper) RemoveImage

func (a *Wrapper) RemoveImage(ctx context.Context, id string) error

func (*Wrapper) RemoveNetwork

func (a *Wrapper) RemoveNetwork(ctx context.Context, id string) error

func (*Wrapper) RemoveVolume

func (a *Wrapper) RemoveVolume(ctx context.Context, id string, force bool) error

func (*Wrapper) RestartContainer

func (a *Wrapper) RestartContainer(ctx context.Context, id string) (string, error)

func (*Wrapper) StartContainer

func (a *Wrapper) StartContainer(ctx context.Context, id string) error

func (*Wrapper) StopContainer

func (a *Wrapper) StopContainer(ctx context.Context, id string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL