cluster

package
v0.0.0-...-f8db6a6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	CreateContainer(config *dockerclient.ContainerConfig, name string) (*Container, error)
	RemoveContainer(container *Container, force bool) error

	Images() []*Image
	Image(IdOrName string) *Image
	Containers() []*Container
	Container(IdOrName string) *Container

	Info() [][2]string
}

type Container

type Container struct {
	dockerclient.Container

	Info dockerclient.ContainerInfo
	Node Node
}

type Event

type Event struct {
	dockerclient.Event
	Node Node
}

type EventHandler

type EventHandler interface {
	Handle(*Event) error
}

type Image

type Image struct {
	dockerclient.Image

	Node Node
}

type Node

type Node interface {
	ID() string
	Name() string

	IP() string   //to inject the actual IP of the machine in docker ps (hostname:port or ip:port)
	Addr() string //to know where to connect with the proxy

	Images() []*Image                     //used by the API
	Image(IdOrName string) *Image         //used by the filters
	Containers() []*Container             //used by the filters
	Container(IdOrName string) *Container //used by the filters

	TotalCpus() int64   //used by the strategy
	UsedCpus() int64    //used by the strategy
	TotalMemory() int64 //used by the strategy
	UsedMemory() int64  //used by the strategy

	Labels() map[string]string //used by the filters

	IsHealthy() bool
}

type Options

type Options struct {
	TLSConfig       *tls.Config
	OvercommitRatio float64
	Discovery       string
	Heartbeat       int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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