v1.8.21 Latest Latest

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

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




This section is empty.


This section is empty.


This section is empty.


type AMQPService

type AMQPService interface {
	//Consume immediately starts delivering queued messages.
	Consume() (<-chan amqp.Delivery, error)
	//send places a message into the queue
	Send(pub amqp.Publishing) error
	//Requeue rejects the oldMsg and queues the newMsg in a transaction
	Requeue(oldMsg amqp.Delivery, newMsg amqp.Publishing) error
	//CreateQueue attempts to publish a queue
	CreateQueue() error

AMQPService acts as a simple interface to the command queue

func NewAMQPService

func NewAMQPService(
	conf config.AMQP,
	repo repository.AMQPRepository,
	log logrus.Ext1FieldLogger) AMQPService

NewAMQPService creates a new AMQPService

type DockerService

type DockerService interface {

	//CreateContainer attempts to create a docker container
	CreateContainer(ctx context.Context, cli *client.Client, container command.Container) entity.Result

	//StartContainer attempts to start an already created docker container
	StartContainer(ctx context.Context, cli *client.Client, sc command.StartContainer) entity.Result

	//RemoveContainer attempts to remove a container
	RemoveContainer(ctx context.Context, cli *client.Client, name string) entity.Result

	//CreateNetwork attempts to create a network
	CreateNetwork(ctx context.Context, cli *client.Client, net command.Network) entity.Result

	//RemoveNetwork attempts to remove a network
	RemoveNetwork(ctx context.Context, cli *client.Client, name string) entity.Result
	AttachNetwork(ctx context.Context, cli *client.Client, network string, container string) entity.Result
	DetachNetwork(ctx context.Context, cli *client.Client, network string, container string) entity.Result
	CreateVolume(ctx context.Context, cli *client.Client, volume command.Volume) entity.Result
	RemoveVolume(ctx context.Context, cli *client.Client, name string) entity.Result
	PlaceFileInContainer(ctx context.Context, cli *client.Client, containerName string, file command.IFile) entity.Result
	Emulation(ctx context.Context, cli *client.Client, netem command.Netconf) entity.Result

	//CreateClient creates a new client for connecting to the docker daemon
	CreateClient(host string) (*client.Client, error)

	//GetNetworkingConfig determines the proper networking config based on the docker hosts state and the networks
	GetNetworkingConfig(ctx context.Context, cli *client.Client, networks strslice.StrSlice) (*network.NetworkingConfig, error)

DockerService provides a intermediate interface between docker and the order from a command

func NewDockerService

NewDockerService creates a new DockerService


Path Synopsis

Jump to

Keyboard shortcuts

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