container

package
v0.0.0-...-b0c3aa7 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateContainerID

func CreateContainerID() string

Types

type Container

type Container struct {
	ContainerID *string      `json:"container_id,omitempty"`
	Image       *image.Image `json:"image,omitempty"`

	Mem  int      `json:"mem,omitempty"`
	Swap int      `json:"swap,omitempty"`
	Pids int      `json:"pids,omitempty"`
	Cpus float64  `json:"cpus,omitempty"`
	Src  string   `json:"src,omitempty"`
	Args []string `json:"args,omitempty"`
}

func NewContainer

func NewContainer(img *image.Image, id *string) *Container

type ContainerService

type ContainerService struct {
	// contains filtered or unexported fields
}

func NewContainerService

func NewContainerService(configHome *config.Home, imgConf *image.ImageConfig, imgSrv *image.ImageService) *ContainerService

func (*ContainerService) GetContainerFSHome

func (c *ContainerService) GetContainerFSHome(container *Container) string

func (*ContainerService) GetContainerHome

func (c *ContainerService) GetContainerHome(container *Container) string

func (*ContainerService) GetContainerHomeByID

func (c *ContainerService) GetContainerHomeByID(containerID string) string

func (*ContainerService) GetContainerMetadataPath

func (c *ContainerService) GetContainerMetadataPath(container *Container) string

func (*ContainerService) GetContainerMetadataPathByID

func (c *ContainerService) GetContainerMetadataPathByID(containerID string) string

func (*ContainerService) Run

func (c *ContainerService) Run(ctx context.Context, container *Container, args []string) error

func (*ContainerService) RunByID

func (c *ContainerService) RunByID(ctx context.Context, containerID string, args []string) error

Jump to

Keyboard shortcuts

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