Documentation ¶
Index ¶
- func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, ...) (cluster.Cluster, error)
- type Cluster
- func (c *Cluster) BuildImage(buildImage *dockerclient.BuildImage, out io.Writer) error
- func (c *Cluster) Container(IDOrName string) *cluster.Container
- func (c *Cluster) Containers() cluster.Containers
- func (c *Cluster) CreateContainer(config *cluster.ContainerConfig, name string, ...) (*cluster.Container, error)
- func (c *Cluster) CreateNetwork(request *dockerclient.NetworkCreate) (response *dockerclient.NetworkCreateResponse, err error)
- func (c *Cluster) CreateVolume(request *dockerclient.VolumeCreateRequest) (*cluster.Volume, error)
- func (c *Cluster) Handle(e *cluster.Event) error
- func (c *Cluster) Image(IDOrName string) *cluster.Image
- func (c *Cluster) Images() cluster.Images
- func (c *Cluster) Import(source string, repository string, tag string, imageReader io.Reader, ...)
- func (c *Cluster) Info() [][]string
- func (c *Cluster) Load(imageReader io.Reader, callback func(where, status string, err error))
- func (c *Cluster) Networks() cluster.Networks
- func (c *Cluster) Pull(name string, authConfig *dockerclient.AuthConfig, ...)
- func (c *Cluster) RANDOMENGINE() (*cluster.Engine, error)
- func (c *Cluster) RegisterEventHandler(h cluster.EventHandler) error
- func (c *Cluster) RemoveContainer(container *cluster.Container, force, volumes bool) error
- func (c *Cluster) RemoveImages(name string, force bool) ([]*dockerclient.ImageDelete, error)
- func (c *Cluster) RemoveNetwork(network *cluster.Network) error
- func (c *Cluster) RemoveVolumes(name string) (bool, error)
- func (c *Cluster) RenameContainer(container *cluster.Container, newName string) error
- func (c *Cluster) TagImage(IDOrName string, repo string, tag string, force bool) error
- func (c *Cluster) TotalCpus() int64
- func (c *Cluster) TotalMemory() int64
- func (c *Cluster) UnregisterEventHandler(h cluster.EventHandler)
- func (c *Cluster) Volume(name string) *cluster.Volume
- func (c *Cluster) Volumes() []*cluster.Volume
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 ¶
func (c *Cluster) BuildImage(buildImage *dockerclient.BuildImage, out io.Writer) error
BuildImage build an image
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 ¶
func (c *Cluster) CreateNetwork(request *dockerclient.NetworkCreate) (response *dockerclient.NetworkCreateResponse, err error)
CreateNetwork creates a network in the cluster
func (*Cluster) CreateVolume ¶
func (c *Cluster) CreateVolume(request *dockerclient.VolumeCreateRequest) (*cluster.Volume, error)
CreateVolume creates a volume in the cluster
func (*Cluster) Import ¶
func (c *Cluster) Import(source string, repository string, tag string, imageReader io.Reader, callback func(what, status string, err error))
Import image
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 ¶
RANDOMENGINE returns a random engine.
func (*Cluster) RegisterEventHandler ¶
func (c *Cluster) RegisterEventHandler(h cluster.EventHandler) error
RegisterEventHandler registers an event handler.
func (*Cluster) RemoveContainer ¶
RemoveContainer aka Remove a container from the cluster.
func (*Cluster) RemoveImages ¶
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 ¶
RemoveNetwork removes a network from the cluster
func (*Cluster) RemoveVolumes ¶
RemoveVolumes removes all the volumes that match `name` from the cluster
func (*Cluster) RenameContainer ¶
RenameContainer rename a container
func (*Cluster) TotalMemory ¶
TotalMemory return the total memory of the cluster
func (*Cluster) UnregisterEventHandler ¶
func (c *Cluster) UnregisterEventHandler(h cluster.EventHandler)
UnregisterEventHandler unregisters a previously registered event handler.