Documentation ¶
Index ¶
- func NewCluster(scheduler *scheduler.Scheduler, store *state.Store, TLSConfig *tls.Config, ...) (cluster.Cluster, error)
- type Cluster
- 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) Handle(e *cluster.Event) error
- func (c *Cluster) Image(IDOrName string) *cluster.Image
- func (c *Cluster) Images() []*cluster.Image
- 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(what, status string))
- 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 bool) error
- func (c *Cluster) RemoveImages(name string) ([]*dockerclient.ImageDelete, error)
- func (c *Cluster) RenameContainer(container *cluster.Container, newName string) error
- func (c *Cluster) TotalCpus() int64
- func (c *Cluster) TotalMemory() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct { sync.RWMutex TLSConfig *tls.Config // contains filtered or unexported fields }
Cluster is exported
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) (*cluster.Container, error)
CreateContainer aka schedule a brand new container into 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))
Import image
func (*Cluster) Pull ¶
func (c *Cluster) Pull(name string, authConfig *dockerclient.AuthConfig, callback func(what, status string))
Pull is exported
func (*Cluster) RANDOMENGINE ¶ added in v0.3.0
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 ¶
RemoveContainer aka Remove a container from the cluster. Containers should always be destroyed through the scheduler to guarantee atomicity.
func (*Cluster) RemoveImages ¶ added in v0.3.0
func (c *Cluster) RemoveImages(name string) ([]*dockerclient.ImageDelete, error)
RemoveImages removes all the images that match `name` from the cluster
func (*Cluster) RenameContainer ¶ added in v0.3.0
RenameContainer rename a container
func (*Cluster) TotalMemory ¶ added in v0.3.0
TotalMemory return the total memory of the cluster
Click to show internal directories.
Click to hide internal directories.