containerinit

package
v0.0.0-...-8488f5b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const SharedPath = "/.container-shared"

Variables

View Source
var SocketPath = filepath.Join(SharedPath, "rpc.sock")

Functions

func Main

func Main()

This code is run INSIDE the container and is responsible for setting up the environment before running the actual process

Types

type Client

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

func NewClient

func NewClient(path string) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) GetPtyMaster

func (c *Client) GetPtyMaster() (*os.File, error)

func (*Client) GetState

func (c *Client) GetState() (State, error)

func (*Client) GetStdin

func (c *Client) GetStdin() (*os.File, error)

func (*Client) GetStreams

func (c *Client) GetStreams() (*os.File, *os.File, *os.File, error)

func (*Client) Resume

func (c *Client) Resume() error

func (*Client) Signal

func (c *Client) Signal(signal int) error

func (*Client) StreamState

func (c *Client) StreamState() <-chan *StateChange

type Config

type Config struct {
	User          string
	Gateway       string
	WorkDir       string
	IP            string
	TTY           bool
	OpenStdin     bool
	Env           map[string]string
	Args          []string
	Ports         []host.Port
	Resources     resource.Resources
	FileArtifacts []*host.Artifact
}

type ContainerInit

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

func (*ContainerInit) GetPtyMaster

func (c *ContainerInit) GetPtyMaster(arg struct{}, fd *fdrpc.FD) error

func (*ContainerInit) GetState

func (c *ContainerInit) GetState(arg *struct{}, status *State) error

func (*ContainerInit) GetStdin

func (c *ContainerInit) GetStdin(arg struct{}, f *os.File) error

func (*ContainerInit) GetStreams

func (c *ContainerInit) GetStreams(arg struct{}, fds *[]fdrpc.FD) error

func (*ContainerInit) Resume

func (c *ContainerInit) Resume(arg, res *struct{}) error

func (*ContainerInit) Signal

func (c *ContainerInit) Signal(sig int, res *struct{}) error

func (*ContainerInit) StreamState

func (c *ContainerInit) StreamState(arg struct{}, stream rpcplus.Stream) error

type State

type State byte
const (
	StateInitial State = iota
	StateRunning
	StateExited
	StateFailed
)

func (State) String

func (s State) String() string

type StateChange

type StateChange struct {
	State      State
	Error      string
	ExitStatus int
}

Jump to

Keyboard shortcuts

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