fakedocker

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeContainerInitInfo

type FakeContainerInitInfo struct {
	Name               string
	Image              string
	State              docker.ContainerState
	RequiredExtraStops int
	RequiredExtraKills int
}

type FakeDockerHost

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

func FakeDockerHostFromContext

func FakeDockerHostFromContext(ctx context.Context) *FakeDockerHost

func NewEmptyFakeDockerHost

func NewEmptyFakeDockerHost() *FakeDockerHost

func NewFakeDockerHost

func NewFakeDockerHost(initInfo *FakeDockerHostInitInfo) *FakeDockerHost

func (*FakeDockerHost) Close

func (f *FakeDockerHost) Close() error

func (*FakeDockerHost) ContainerCreate

func (f *FakeDockerHost) ContainerCreate(ctx context.Context, cConfig *dcontainer.Config, hConfig *dcontainer.HostConfig, nConfig *dnetwork.NetworkingConfig, platform *ocispec.Platform, containerName string) (dcontainer.CreateResponse, error)

func (*FakeDockerHost) ContainerInspect

func (f *FakeDockerHost) ContainerInspect(ctx context.Context, containerName string) (dtypes.ContainerJSON, error)

func (*FakeDockerHost) ContainerKill

func (f *FakeDockerHost) ContainerKill(ctx context.Context, containerName, signal string) error

func (*FakeDockerHost) ContainerRemove

func (f *FakeDockerHost) ContainerRemove(ctx context.Context, containerName string, options dcontainer.RemoveOptions) error

func (*FakeDockerHost) ContainerStart

func (f *FakeDockerHost) ContainerStart(ctx context.Context, containerName string, options dcontainer.StartOptions) error

func (*FakeDockerHost) ContainerStop

func (f *FakeDockerHost) ContainerStop(ctx context.Context, containerName string, options dcontainer.StopOptions) error

func (*FakeDockerHost) ContainerStopIssued

func (f *FakeDockerHost) ContainerStopIssued(containerName string) bool

func (*FakeDockerHost) ForceRemoveContainer

func (f *FakeDockerHost) ForceRemoveContainer(containerName string) error

func (*FakeDockerHost) GetContainerState

func (f *FakeDockerHost) GetContainerState(containerName string) docker.ContainerState

func (*FakeDockerHost) ImageList

func (f *FakeDockerHost) ImageList(ctx context.Context, options dimage.ListOptions) ([]dimage.Summary, error)

func (*FakeDockerHost) ImagePull

func (f *FakeDockerHost) ImagePull(ctx context.Context, imageName string, options dimage.PullOptions) (io.ReadCloser, error)

func (*FakeDockerHost) NetworkConnect

func (f *FakeDockerHost) NetworkConnect(ctx context.Context, networkName, containerName string, config *dnetwork.EndpointSettings) error

func (*FakeDockerHost) NetworkCreate

func (f *FakeDockerHost) NetworkCreate(ctx context.Context, networkName string, options dnetwork.CreateOptions) (dnetwork.CreateResponse, error)

func (*FakeDockerHost) NetworkDisconnect

func (f *FakeDockerHost) NetworkDisconnect(ctx context.Context, networkName, containerName string, force bool) error

func (*FakeDockerHost) NetworkList

func (f *FakeDockerHost) NetworkList(ctx context.Context, options dnetwork.ListOptions) ([]dnetwork.Summary, error)

func (*FakeDockerHost) NetworkRemove

func (f *FakeDockerHost) NetworkRemove(ctx context.Context, networkName string) error

type FakeDockerHostInitInfo

type FakeDockerHostInitInfo struct {
	Containers           []*FakeContainerInitInfo
	Networks             []*FakeNetworkInitInfo
	ExistingImages       utils.StringSet
	WarnContainerCreate  utils.StringSet
	FailContainerCreate  utils.StringSet
	FailContainerInspect utils.StringSet
	FailContainerKill    utils.StringSet
	FailContainerRemove  utils.StringSet
	FailContainerStart   utils.StringSet
	FailContainerStop    utils.StringSet
	ValidImagesForPull   utils.StringSet
	FailImagePull        utils.StringSet
	NoImageAfterPull     utils.StringSet
	WarnNetworkCreate    utils.StringSet
	FailNetworkCreate    utils.StringSet
	FailNetworkConnect   utils.StringSet
}

type FakeNetworkInitInfo

type FakeNetworkInitInfo struct {
	Name string
}

Jump to

Keyboard shortcuts

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