containerengine

package
v1.0.2-develop.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cli

Types

type ContainerEngine

type ContainerEngine interface {
	Type() string
	Build(dockerfile, path, imageTag string, buildArgs map[string]string) error
	ListImages(stackName, containerName string) ([]Image, error)
	ImagePull(rawImage string) error
	NetworkCreate(name string) error
	ContainerCreate(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, name string) (string, error)
	Start(nameOrID string) error
	Stop(nameOrID string, timeout *time.Duration) error
	ContainerWait(containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error)
	CopyFromArchive(nameOrID string, path string, reader io.Reader) error
	ContainersListByLabel(match map[string]string) ([]types.Container, error)
	RemoveByLabel(labels map[string]string) error
	ContainerExec(containerName string, cmd []string, workingDir string) error
	ContainerLogs(containerID string, opts types.ContainerLogsOptions) (io.ReadCloser, error)
	Logger(stackPath string) ContainerLogger
}
var DiscoveredEngine ContainerEngine

func Discover

func Discover() (ContainerEngine, error)

type ContainerLogger

type ContainerLogger interface {
	Start() error
	Stop() error
	Config() *container.LogConfig
}

type ErrorDetail

type ErrorDetail struct {
	Message string `json:"message"`
}

type ErrorLine

type ErrorLine struct {
	Error       string      `json:"error"`
	ErrorDetail ErrorDetail `json:"errorDetail"`
}

type Image

type Image struct {
	ID         string `yaml:"id"`
	Repository string `yaml:"repository,omitempty"`
	Tag        string `yaml:"tag,omitempty"`
	CreatedAt  string `yaml:"createdAt,omitempty"`
}

type Line

type Line struct {
	Stream string `json:"stream"`
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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