cluster

package
v0.0.0-...-2c34bc7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2014 License: BSD-3-Clause Imports: 27 Imported by: 3

Documentation

Index

Constants

View Source
const (
	IFNAMSIZ      = 16
	IFF_TAP       = 0x0002
	IFF_NO_PI     = 0x1000
	TUNSETIFF     = 0x400454ca
	TUNSETPERSIST = 0x400454cb
	TUNSETOWNER   = 0x400454cc
	TUNSETGROUP   = 0x400454ce
)

Variables

This section is empty.

Functions

func BuildFlynn

func BuildFlynn(bc BootConfig, dockerFS string, repos map[string]string, out io.Writer) (string, error)

Types

type BootConfig

type BootConfig struct {
	User     string
	RootFS   string
	Kernel   string
	Network  string
	NatIface string
}

type Bridge

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

func (*Bridge) IP

func (b *Bridge) IP() string

type Cluster

type Cluster struct {
	ControllerDomain string
	ControllerPin    string
	ControllerKey    string
	// contains filtered or unexported fields
}

func New

func New(bc BootConfig, out io.Writer) *Cluster

func (*Cluster) Boot

func (c *Cluster) Boot(dockerfs string, count int) error

func (*Cluster) BuildFlynn

func (c *Cluster) BuildFlynn(dockerFS string, repos map[string]string) (string, error)

func (*Cluster) Shutdown

func (c *Cluster) Shutdown()

type Instance

type Instance interface {
	DialSSH() (*ssh.Client, error)
	Start() error
	Wait() error
	Kill() error
	IP() string
	Run(string, attempt.Strategy, io.Writer, io.Writer) error
	Drive(string) *VMDrive
}

type Tap

type Tap struct {
	Name              string
	LocalIP, RemoteIP *net.IP
	// contains filtered or unexported fields
}

func (*Tap) Close

func (t *Tap) Close() error

func (*Tap) WriteInterfaceConfig

func (t *Tap) WriteInterfaceConfig(f io.Writer) error

type TapManager

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

func (*TapManager) NewTap

func (t *TapManager) NewTap(uid, gid int) (*Tap, error)

type VMConfig

type VMConfig struct {
	Kernel string
	User   int
	Group  int
	Memory string
	Drives map[string]*VMDrive
	Args   []string
	Out    io.Writer
	// contains filtered or unexported fields
}

type VMDrive

type VMDrive struct {
	FS   string
	COW  bool
	Temp bool
}

type VMManager

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

func NewVMManager

func NewVMManager(bridge *Bridge) *VMManager

func (*VMManager) NewInstance

func (v *VMManager) NewInstance(c *VMConfig) (Instance, error)

Jump to

Keyboard shortcuts

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