swarm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCluster

func NewCluster(scheduler *scheduler.Scheduler, store *state.Store, eventhandler cluster.EventHandler, options *cluster.Options) cluster.Cluster

NewCluster is exported

func NewNode

func NewNode(addr string, overcommitRatio float64) *node

NewNode is exported

Types

type Cluster

type Cluster struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Cluster is exported

func (*Cluster) Container

func (c *Cluster) Container(IDOrName string) *cluster.Container

Container returns the container with IDOrName in the cluster

func (*Cluster) Containers

func (c *Cluster) Containers() []*cluster.Container

Containers returns all the containers in the cluster.

func (*Cluster) CreateContainer

func (c *Cluster) CreateContainer(config *dockerclient.ContainerConfig, name string) (*cluster.Container, error)

CreateContainer aka schedule a brand new container into the cluster.

func (*Cluster) Handle

func (c *Cluster) Handle(e *cluster.Event) error

Handle callbacks for the events

func (*Cluster) Image

func (c *Cluster) Image(IDOrName string) *cluster.Image

Image returns an image with IDOrName in the cluster

func (*Cluster) Images

func (c *Cluster) Images() []*cluster.Image

Images returns all the images in the cluster.

func (*Cluster) Info

func (c *Cluster) Info() [][2]string

Info is exported

func (*Cluster) Pull

func (c *Cluster) Pull(name string, callback func(what, status string))

Pull is exported

func (*Cluster) RemoveContainer

func (c *Cluster) RemoveContainer(container *cluster.Container, force bool) error

RemoveContainer aka Remove a container from the cluster. Containers should always be destroyed through the scheduler to guarantee atomicity.

func (*Cluster) RemoveImage

func (c *Cluster) RemoveImage(image *cluster.Image) ([]*dockerclient.ImageDelete, error)

RemoveImage removes an image from the cluster

Jump to

Keyboard shortcuts

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