repository

package
v1.8.21 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPRepository

type AMQPRepository interface {
	GetChannel() (externals.AMQPChannel, error)
	RejectDelivery(msg externals.AMQPDelivery, requeue bool) error
}

AMQPRepository represents functions for connecting to a AMQP provider

func NewAMQPRepository

func NewAMQPRepository(conn externals.AMQPConnection) AMQPRepository

NewAMQPRepository creates a new AMQPRepository

type DockerRepository

type DockerRepository interface {
	//ContainerAttach attaches to a container
	ContainerAttach(ctx context.Context, cli entity.Client, container string,
		options types.ContainerAttachOptions) (types.HijackedResponse, error)

	//ContainerCreate creates a new container based in the given configuration. It can be associated with a name, but it's not mandatory.
	ContainerCreate(ctx context.Context, cli entity.Client, config *container.Config, hostConfig *container.HostConfig,
		networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)

	//ContainerList returns the list of containers in the docker host.
	ContainerList(ctx context.Context, cli entity.Client, options types.ContainerListOptions) ([]types.Container, error)

	//ContainerRemove kills and removes a container from the docker host.
	ContainerRemove(ctx context.Context, cli entity.Client, containerID string, options types.ContainerRemoveOptions) error

	//ContainerStart sends a request to the docker daemon to start a container.
	ContainerStart(ctx context.Context, cli entity.Client, containerID string, options types.ContainerStartOptions) error

	//CopyToContainer copies content into the container filesystem. Note that `content` must be a Reader for a TAR archive
	CopyToContainer(ctx context.Context, cli entity.Client, containerID, dstPath string, content io.Reader,
		options types.CopyToContainerOptions) error

	//ImageList returns a list of images in the docker host
	ImageList(ctx context.Context, cli entity.Client, options types.ImageListOptions) ([]types.ImageSummary, error)

	//ImageLoad is used to upload a docker image
	ImageLoad(ctx context.Context, cli entity.Client, input io.Reader, quiet bool) (types.ImageLoadResponse, error)

	//ImagePull is used to pull a docker image
	ImagePull(ctx context.Context, cli entity.Client, refStr string, options types.ImagePullOptions) (io.ReadCloser, error)

	//NetworkCreate sends a request to the docker daemon to create a network
	NetworkCreate(ctx context.Context, cli entity.Client, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)

	//NetworkConnect connects a container to an existent network in the docker host.
	NetworkConnect(ctx context.Context, cli entity.Client, networkID, containerID string, config *network.EndpointSettings) error

	//NetworkDisconnect disconnects a container from an existent network in the docker host.
	NetworkDisconnect(ctx context.Context, cli entity.Client, networkID, containerID string, force bool) error

	//NetworkRemove sends a request to the docker daemon to remove a network
	NetworkRemove(ctx context.Context, cli entity.Client, networkID string) error

	//NetworkList lists the networks known to the docker daemon
	NetworkList(ctx context.Context, cli entity.Client, options types.NetworkListOptions) ([]types.NetworkResource, error)

	//VolumeList returns the volumes configured in the docker host.
	VolumeList(ctx context.Context, cli entity.Client, filter filters.Args) (volume.VolumeListOKBody, error)

	//VolumeRemove removes a volume from the docker host.
	VolumeRemove(ctx context.Context, cli entity.Client, volumeID string, force bool) error

	//VolumeCreate creates a volume in the container
	VolumeCreate(ctx context.Context, cli entity.Client, options volume.VolumeCreateBody) (types.Volume, error)
}

DockerRepository represents direct interacts with the docker daemon

func NewDockerRepository

func NewDockerRepository() DockerRepository

NewDockerRepository creates a new DockerRepository

Jump to

Keyboard shortcuts

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