isolate

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 License: LGPL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	BoxesTag = "isolate.boxes.tag"
)

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(ctx context.Context) log.Interface

func IsCancelled

func IsCancelled(ctx context.Context) bool

IsCancelled checks whether context is cancelled

func NotifyAbouStart

func NotifyAbouStart(ch chan ProcessOutput)

Types

type ArgsUnpacker

type ArgsUnpacker interface {
	Unpack(in interface{}, out ...interface{}) error
}

type Box

type Box interface {
	Spool(ctx context.Context, name string, opts Profile) error
	Spawn(ctx context.Context, opts Profile, name, executable string, args, env map[string]string) (Process, error)
	Close() error
}

type BoxConfig

type BoxConfig map[string]interface{}

type Boxes

type Boxes map[string]Box

type ConnectionHandler

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

ConnectionHandler provides method to handle accepted connection for Listener

func NewConnectionHandler

func NewConnectionHandler(ctx context.Context) (*ConnectionHandler, error)

NewConnectionHandler creates new ConnectionHandler

func (*ConnectionHandler) HandleConn

func (h *ConnectionHandler) HandleConn(conn io.ReadWriteCloser)

HandleConn decodes commands from Cocaine runtime and calls dispatchers

type Decoder

type Decoder interface {
	Decode(interface{}) error
}

Decoder decodes messages from Cocaine-runtime

type Dispatcher

type Dispatcher interface {
	Handle(msg *message) (Dispatcher, error)
}

Dispatcher handles incoming messages and keeps the state of the channel

type Downstream

type Downstream interface {
	Reply(code int, args ...interface{}) error
}

type Encoder

type Encoder interface {
	Encode(interface{}) error
}

Encoder sends replies to the Cocaine-runtime

type Process

type Process interface {
	Output() <-chan ProcessOutput
	Kill() error
}

type ProcessOutput

type ProcessOutput struct {
	Err  error
	Data []byte
}

type Profile

type Profile map[string]interface{}

func (Profile) Type

func (p Profile) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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