docker

package
v0.0.1-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildArtifact

func BuildArtifact(ctx context.Context, logger logrus.FieldLogger, artifact *atlasfile.ArtifactConfig, cwd string) error

func CleanupAll

func CleanupAll(ctx context.Context, logger logrus.FieldLogger) error

func CreateNetwork

func CreateNetwork(ctx context.Context, logger logrus.FieldLogger, name string) error

func CreateServiceContainer

func CreateServiceContainer(
	ctx context.Context,
	logger logrus.FieldLogger,
	stack *atlasfile.StackConfig,
	service *atlasfile.ServiceConfig,
	stackService *atlasfile.StackService,
	file *atlasfile.Atlasfile,
	ensuredVolumes EnsuredVolumes,
	ensuredNetworks EnsuredNetworks,
	containerName string,
) error

func CreateVolume

func CreateVolume(ctx context.Context, logger logrus.FieldLogger, name string) error

func DeleteContainer

func DeleteContainer(ctx context.Context, logger logrus.FieldLogger, containerName string) error

func DeleteNetwork

func DeleteNetwork(ctx context.Context, logger logrus.FieldLogger, networkName string) error

func DeleteVolume

func DeleteVolume(ctx context.Context, logger logrus.FieldLogger, volumeName string) error

func GetNetworkId

func GetNetworkId(ctx context.Context, networkName string) (string, error)

func IsRunning

func IsRunning(ctx context.Context) bool

func StartContainer

func StartContainer(ctx context.Context, containerName string) error

func StopContainer

func StopContainer(ctx context.Context, containerName string) error

Types

type ContainerInfos

type ContainerInfos struct {
	FetchedAt string `json:"fetchedAt"`
	Id        string `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	State     string `json:"state"`
}

func GetContainerInfo

func GetContainerInfo(ctx context.Context, containerName string) (*ContainerInfos, error)

type EnsuredNetwork

type EnsuredNetwork struct {
	Stack        string
	PhysicalName string
}

type EnsuredNetworks

type EnsuredNetworks []EnsuredNetwork

func EnsureNetworks

func EnsureNetworks(ctx context.Context, logger logrus.FieldLogger, stacks []atlasfile.StackConfig, a *atlasfile.Atlasfile) (EnsuredNetworks, error)

EnsureNetworks creates networks where needed and returns a list of networks that were created.

func (*EnsuredNetworks) Get

func (e *EnsuredNetworks) Get(stackName string) string

type EnsuredVolume

type EnsuredVolume struct {
	Stack        string
	Service      string
	VolumeName   string
	PhysicalName string
}

type EnsuredVolumes

type EnsuredVolumes []EnsuredVolume

func EnsureVolumes

func EnsureVolumes(ctx context.Context, logger logrus.FieldLogger, stacks []atlasfile.StackConfig, a *atlasfile.Atlasfile) (EnsuredVolumes, error)

EnsureVolumes creates volumes where needed and returns a list of volumes that were created.

func (*EnsuredVolumes) Get

func (e *EnsuredVolumes) Get(stackName, serviceName, volumeName string) string

Jump to

Keyboard shortcuts

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