container

package
v0.0.0-...-a77887b Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContainerByName

func CheckContainerByName(name string) bool

func CheckInitArgs

func CheckInitArgs(initArgs []string) bool

func ContainerAsJson

func ContainerAsJson(c *Container) ([]byte, error)

func GetContainerLogFile

func GetContainerLogFile(c *Container) (*os.File, error)

func InitContainerFS

func InitContainerFS(c *Container) error

func MountProc

func MountProc(rootPath string) error

func MountVolumn

func MountVolumn(c *Container) error

func PivotRoot

func PivotRoot(newroot string) error

func PrintContainerLog

func PrintContainerLog(containerId string)

func PrintShow

func PrintShow(showAll bool) error

func ReleaseContainerFS

func ReleaseContainerFS(c *Container) error

func RunContainer

func RunContainer(name string, tty bool, initArgs []string, limits map[string]string, volumns []string) error

func RunContainerInitProcess

func RunContainerInitProcess()

func UnmountVolumn

func UnmountVolumn(c *Container) error

func WriteContainerConfigFile

func WriteContainerConfigFile(c *Container) error

Types

type Container

type Container struct {
	ID            *UUID
	Name          string
	TTY           bool
	Root          string
	Path          string
	ReadOnlyLayer string
	WriteLayer    string
	Args          []string
	Limits        map[string]string
	Volumns       []string
	ImageID       string
	Created       time.Time
	Pid           int
	Status        *State
}

func JsonAsContainer

func JsonAsContainer(jsonBytes []byte) (*Container, error)

type State

type State struct {
	ID   int
	Name string
}

func ContainerCreated

func ContainerCreated() *State

func ContainerExited

func ContainerExited() *State

func ContainerRunning

func ContainerRunning() *State

func ContainerStopped

func ContainerStopped() *State

type UUID

type UUID struct {
	Original uuid.UUID
}

func NewUUID

func NewUUID() *UUID

func (*UUID) String

func (u *UUID) String() string

type Volumn

type Volumn struct {
	HostPath      string
	ContainerPath string
}

func NewVolumns

func NewVolumns(volumnStrs []string) []*Volumn

Jump to

Keyboard shortcuts

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