swarm

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2016 License: Apache-2.0, CC-BY-SA-4.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCluster

func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, discovery discovery.Backend, options cluster.DriverOpts, engineOptions *cluster.EngineOpts) (cluster.Cluster, error)

NewCluster is exported

Types

type Cluster

type Cluster struct {
	sync.RWMutex

	TLSConfig *tls.Config
	// contains filtered or unexported fields
}

Cluster is exported

func (*Cluster) BuildImage added in v0.4.0

func (c *Cluster) BuildImage(buildImage *dockerclient.BuildImage, out io.Writer) error

BuildImage build an image

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.Containers

Containers returns all the containers in the cluster.

func (*Cluster) CreateContainer

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

CreateContainer aka schedule a brand new container into the cluster.

func (*Cluster) CreateNetwork added in v1.0.0

func (c *Cluster) CreateNetwork(request *dockerclient.NetworkCreate) (response *dockerclient.NetworkCreateResponse, err error)

CreateNetwork creates a network in the cluster

func (*Cluster) CreateVolume added in v1.0.0

func (c *Cluster) CreateVolume(request *dockerclient.VolumeCreateRequest) (*cluster.Volume, error)

CreateVolume creates a volume in 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.Images

Images returns all the images in the cluster.

func (*Cluster) Import added in v0.3.0

func (c *Cluster) Import(source string, repository string, tag string, imageReader io.Reader, callback func(what, status string, err error))

Import image

func (*Cluster) Info

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

Info returns some info about the cluster, like nb or containers / images

func (*Cluster) Load added in v0.3.0

func (c *Cluster) Load(imageReader io.Reader, callback func(where, status string, err error))

Load image

func (*Cluster) Networks added in v1.0.0

func (c *Cluster) Networks() cluster.Networks

Networks returns all the networks in the cluster.

func (*Cluster) Pull

func (c *Cluster) Pull(name string, authConfig *dockerclient.AuthConfig, callback func(where, status string, err error))

Pull is exported

func (*Cluster) RANDOMENGINE added in v0.3.0

func (c *Cluster) RANDOMENGINE() (*cluster.Engine, error)

RANDOMENGINE returns a random engine.

func (*Cluster) RegisterEventHandler added in v0.3.0

func (c *Cluster) RegisterEventHandler(h cluster.EventHandler) error

RegisterEventHandler registers an event handler.

func (*Cluster) RemoveContainer

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

RemoveContainer aka Remove a container from the cluster.

func (*Cluster) RemoveImages added in v0.3.0

func (c *Cluster) RemoveImages(name string, force bool) ([]*dockerclient.ImageDelete, error)

RemoveImages removes all the images that match `name` from the cluster

func (*Cluster) RemoveNetwork added in v1.0.0

func (c *Cluster) RemoveNetwork(network *cluster.Network) error

RemoveNetwork removes a network from the cluster

func (*Cluster) RemoveVolumes added in v1.0.0

func (c *Cluster) RemoveVolumes(name string) (bool, error)

RemoveVolumes removes all the volumes that match `name` from the cluster

func (*Cluster) RenameContainer added in v0.3.0

func (c *Cluster) RenameContainer(container *cluster.Container, newName string) error

RenameContainer rename a container

func (*Cluster) StartContainer added in v1.1.0

func (c *Cluster) StartContainer(container *cluster.Container) error

StartContainer starts a container

func (*Cluster) TagImage added in v1.0.0

func (c *Cluster) TagImage(IDOrName string, repo string, tag string, force bool) error

TagImage tag an image

func (*Cluster) TotalCpus added in v0.3.0

func (c *Cluster) TotalCpus() int64

TotalCpus return the total memory of the cluster

func (*Cluster) TotalMemory added in v0.3.0

func (c *Cluster) TotalMemory() int64

TotalMemory return the total memory of the cluster

func (*Cluster) UnregisterEventHandler added in v1.1.0

func (c *Cluster) UnregisterEventHandler(h cluster.EventHandler)

UnregisterEventHandler unregisters a previously registered event handler.

func (*Cluster) Volumes added in v1.0.0

func (c *Cluster) Volumes() cluster.Volumes

Volumes returns all the volumes in the cluster.

Jump to

Keyboard shortcuts

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