container

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const LABEL_PREFIX = "io.clace."

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID         string `json:"ID"`
	Names      string `json:"Names"`
	Image      string `json:"Image"`
	State      string `json:"State"`
	Status     string `json:"Status"`
	PortString string `json:"Ports"`
	Port       int
}

type ContainerCommand

type ContainerCommand struct {
	*types.Logger
}

func (ContainerCommand) BuildImage

func (c ContainerCommand) BuildImage(config *types.SystemConfig, name ImageName, sourceUrl, containerFile string) error

func (ContainerCommand) ExecTailN

func (c ContainerCommand) ExecTailN(command string, args []string, n int) ([]string, error)

ExecTailN executes a command and returns the last n lines of output

func (ContainerCommand) GetContainerLogs

func (c ContainerCommand) GetContainerLogs(config *types.SystemConfig, name ContainerName) (string, error)

func (ContainerCommand) GetContainers

func (c ContainerCommand) GetContainers(config *types.SystemConfig, name ContainerName, getAll bool) ([]Container, error)

func (ContainerCommand) GetImages

func (c ContainerCommand) GetImages(config *types.SystemConfig, name ImageName) ([]Image, error)

func (ContainerCommand) RemoveContainer

func (c ContainerCommand) RemoveContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) RemoveImage

func (c ContainerCommand) RemoveImage(config *types.SystemConfig, name ImageName) error

func (ContainerCommand) RunContainer

func (c ContainerCommand) RunContainer(config *types.SystemConfig, appEntry *types.AppEntry, containerName ContainerName,
	imageName ImageName, port int64, envMap map[string]string, mountArgs []string) error

func (ContainerCommand) StartContainer

func (c ContainerCommand) StartContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) StopContainer

func (c ContainerCommand) StopContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) VolumeCreate added in v0.6.5

func (c ContainerCommand) VolumeCreate(config *types.SystemConfig, name VolumeName) error

func (ContainerCommand) VolumeExists added in v0.6.5

func (c ContainerCommand) VolumeExists(config *types.SystemConfig, name VolumeName) bool

type ContainerName

type ContainerName string

func GenContainerName

func GenContainerName(appId types.AppId, contentHash string) ContainerName

type Image

type Image struct {
	Repository string `json:"Repository"`
}

type ImageName

type ImageName string

func GenImageName

func GenImageName(appId types.AppId, contentHash string) ImageName

type Manager

type Manager struct {
	*types.Logger
	// contains filtered or unexported fields
}

func NewContainerManager

func NewContainerManager(logger *types.Logger, appEntry *types.AppEntry, containerFile string,
	systemConfig *types.SystemConfig, configPort int64, lifetime, scheme, health, buildDir string, sourceFS appfs.ReadableFS,
	paramMap map[string]string) (*Manager, error)

func (*Manager) DevReload

func (m *Manager) DevReload(dryRun bool) error

func (*Manager) GetEnvMap

func (m *Manager) GetEnvMap() (map[string]string, string)

func (*Manager) GetHealthUrl

func (m *Manager) GetHealthUrl() string

func (*Manager) GetProxyUrl

func (m *Manager) GetProxyUrl() string

func (*Manager) ProdReload

func (m *Manager) ProdReload(excludeGlob []string, dryRun bool) error

func (*Manager) WaitForHealth

func (m *Manager) WaitForHealth(url string) error

type VolumeName added in v0.6.5

type VolumeName string

func GenVolumeName added in v0.6.5

func GenVolumeName(appId types.AppId, dirName string) VolumeName

Jump to

Keyboard shortcuts

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