container

package
v0.0.0-...-06cacfd Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2013 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindMount

type BindMount struct {
	SrcPath string `json:"src_path"`
	DstPath string `json:"dst_path"`
	Mode    string `json:"mode"`
}

type CommandLineJson

type CommandLineJson struct {
	DiskLimitInBytes   uint64       `json:"disk_limit_in_bytes",required`
	MemoryLimitInBytes uint64       `json:"memory_limit_in_bytes"`
	BindMounts         []*BindMount `json:"bind_mounts"`
	WardenSocketPath   string       `json:"warden_socket_path"`
}

func (*CommandLineJson) IsValid

func (c *CommandLineJson) IsValid() bool

type Container

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

func NewContainer

func NewContainer(client warden.ConnectedWardenClient) *Container

func (*Container) ConfigureApplicationPorts

func (c *Container) ConfigureApplicationPorts()

func (*Container) ConfigureConsolePorts

func (c *Container) ConfigureConsolePorts()

func (*Container) ConfigureDebugPorts

func (c *Container) ConfigureDebugPorts()

func (*Container) ConfigureHomeDirectory

func (c *Container) ConfigureHomeDirectory()

func (*Container) Create

func (c *Container) Create(pathsToBind []*BindMount) error

func (*Container) SetDiskLimit

func (c *Container) SetDiskLimit(limitInBytes uint64) error

func (*Container) SetMemoryLimit

func (c *Container) SetMemoryLimit(limitInBytes uint64) error

type ContainerCreator

type ContainerCreator interface {
	Create([]*BindMount) error
	SetDiskLimit(limitInBytes uint64) error
	SetMemoryLimit(limitInBytes uint64) error
}

type State

type State struct {
	Container       ContainerCreator
	CommandLineJson *CommandLineJson
}

func Main

func Main(inputJson string) (*State, error)

func NewState

func NewState(container ContainerCreator, commandLineJson *CommandLineJson) *State

func (*State) Perform

func (s *State) Perform()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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