container

package
v0.0.0-...-fecfafd Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerConfig

type ContainerConfig struct {
	DomainName       string
	ImageName        string
	ContainerName    string
	ContainerID      string
	ContainerPort    string
	HostPort         string
	RegistryUsername string
	RegistryPassword string
	Cmd              strslice.StrSlice
	Status           string
}

type ContainerManager

type ContainerManager struct {
	DockerClient *docker.DockerClient

	Db            *database.Database
	Logger        *logging.Logger
	HealthChecker *health.HealthChecker
	// contains filtered or unexported fields
}

func NewContainerManager

func NewContainerManager() (*ContainerManager, error)

func (*ContainerManager) ContainerStatus

func (cm *ContainerManager) ContainerStatus(containerId string) string

func (*ContainerManager) CreateNewContainer

func (cm *ContainerManager) CreateNewContainer(ctx context.Context, config *ContainerConfig) error

func (*ContainerManager) ListContainers

func (cm *ContainerManager) ListContainers() ([]ContainerConfig, error)

func (*ContainerManager) LoadAndStartContainers

func (cm *ContainerManager) LoadAndStartContainers(ctx context.Context, Cmd strslice.StrSlice) error

func (*ContainerManager) RemoveContainer

func (cm *ContainerManager) RemoveContainer(ctx context.Context, containerID string) error

func (*ContainerManager) RemoveContainerAndImage

func (cm *ContainerManager) RemoveContainerAndImage(ctx context.Context, containerID string) error

func (*ContainerManager) RunAsDaemon

func (cm *ContainerManager) RunAsDaemon(ctx context.Context) error

func (*ContainerManager) UpdateExistingContainer

func (cm *ContainerManager) UpdateExistingContainer(ctx context.Context, config *ContainerConfig) error

the config can just contain the container name and the new image name

Jump to

Keyboard shortcuts

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