Documentation ¶
Index ¶
- func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, ...) (cluster.Cluster, error)
- type Cluster
- func (c *Cluster) BuildImage(buildContext io.Reader, buildImage *types.ImageBuildOptions, ...) error
- func (c *Cluster) Container(IDOrName string) *cluster.Container
- func (c *Cluster) Containers() cluster.Containers
- func (c *Cluster) CreateContainer(config *cluster.ContainerConfig, name string, authConfig *types.AuthConfig) (*cluster.Container, error)
- func (c *Cluster) CreateNetwork(name string, request *types.NetworkCreate) (response *types.NetworkCreateResponse, err error)
- func (c *Cluster) CreateVolume(request *volume.VolumesCreateBody) (*types.Volume, error)
- func (c *Cluster) Image(IDOrName string) *cluster.Image
- func (c *Cluster) Images() cluster.Images
- func (c *Cluster) Import(source string, ref string, tag string, imageReader io.Reader, ...)
- func (c *Cluster) Info() [][2]string
- func (c *Cluster) Load(imageReader io.Reader, callback func(msg cluster.JSONMessageWrapper))
- func (c *Cluster) Networks() cluster.Networks
- func (c *Cluster) NewAPIEventHandler() *cluster.APIEventHandler
- func (c *Cluster) Pull(name string, authConfig *types.AuthConfig, ...)
- func (c *Cluster) RANDOMENGINE() (*cluster.Engine, error)
- func (c *Cluster) RefreshEngine(hostname string) error
- func (c *Cluster) RefreshEngines() error
- func (c *Cluster) RemoveContainer(container *cluster.Container, force, volumes bool) error
- func (c *Cluster) RemoveImages(name string, force bool) ([]types.ImageDeleteResponseItem, 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) StartContainer(container *cluster.Container) error
- func (c *Cluster) TagImage(IDOrName string, ref string, force bool) error
- func (c *Cluster) TotalCpus() int64
- func (c *Cluster) TotalMemory() int64
- func (c *Cluster) Volumes() cluster.Volumes
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 cluster.ClusterEventHandlers TLSConfig *tls.Config // contains filtered or unexported fields }
Cluster is exported.
func (*Cluster) BuildImage ¶ added in v0.4.0
func (c *Cluster) BuildImage(buildContext io.Reader, buildImage *types.ImageBuildOptions, callback func(msg cluster.JSONMessageWrapper)) error
BuildImage builds 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 *types.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(name string, request *types.NetworkCreate) (response *types.NetworkCreateResponse, err error)
CreateNetwork creates a network in the cluster.
func (*Cluster) CreateVolume ¶ added in v1.0.0
CreateVolume creates a volume in the cluster.
func (*Cluster) Import ¶ added in v0.3.0
func (c *Cluster) Import(source string, ref string, tag string, imageReader io.Reader, callback func(msg cluster.JSONMessageWrapper))
Import imports image.
func (*Cluster) Load ¶ added in v0.3.0
func (c *Cluster) Load(imageReader io.Reader, callback func(msg cluster.JSONMessageWrapper))
Load loads image.
func (*Cluster) NewAPIEventHandler ¶ added in v1.2.9
func (c *Cluster) NewAPIEventHandler() *cluster.APIEventHandler
NewAPIEventHandler creates a new API events handler
func (*Cluster) Pull ¶
func (c *Cluster) Pull(name string, authConfig *types.AuthConfig, callback func(msg cluster.JSONMessageWrapper))
Pull is exported.
func (*Cluster) RANDOMENGINE ¶ added in v0.3.0
RANDOMENGINE returns a random engine.
func (*Cluster) RefreshEngine ¶ added in v1.2.9
RefreshEngine refreshes all containers in a specific engine.
func (*Cluster) RefreshEngines ¶ added in v1.2.9
RefreshEngines refreshes all containers in the cluster.
func (*Cluster) RemoveContainer ¶
RemoveContainer aka Remove a container from the cluster.
func (*Cluster) RemoveImages ¶ added in v0.3.0
RemoveImages removes all the images that match `name` from the cluster.
func (*Cluster) RemoveNetwork ¶ added in v1.0.0
RemoveNetwork removes a network from the cluster.
func (*Cluster) RemoveVolumes ¶ added in v1.0.0
RemoveVolumes removes all the volumes that match `name` from the cluster.
func (*Cluster) RenameContainer ¶ added in v0.3.0
RenameContainer renames a container
func (*Cluster) StartContainer ¶ added in v1.2.9
StartContainer starts a container.
func (*Cluster) TotalMemory ¶ added in v0.3.0
TotalMemory returns the total memory of the cluster.