Documentation ¶
Index ¶
- func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, master string, ...) (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) (*dockerclient.NetworkCreateResponse, error)
- func (c *Cluster) CreateVolume(request *dockerclient.VolumeCreateRequest) (*cluster.Volume, error)
- func (c *Cluster) Disconnected(mesosscheduler.SchedulerDriver)
- func (c *Cluster) Error(d mesosscheduler.SchedulerDriver, msg string)
- func (c *Cluster) ExecutorLost(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, ...)
- func (c *Cluster) FrameworkMessage(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, ...)
- func (c *Cluster) Handle(e *cluster.Event) error
- func (c *Cluster) Image(IDOrName string) *cluster.Image
- func (c *Cluster) Images(all bool, filters dockerfilters.Args) []*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(where, status string, err error))
- func (c *Cluster) Networks() cluster.Networks
- func (c *Cluster) OfferRescinded(mesosscheduler.SchedulerDriver, *mesosproto.OfferID)
- 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) Registered(driver mesosscheduler.SchedulerDriver, fwID *mesosproto.FrameworkID, ...)
- func (c *Cluster) RemoveContainer(container *cluster.Container, force, volumes bool) error
- func (c *Cluster) RemoveImage(image *cluster.Image) ([]*dockerclient.ImageDelete, 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) Reregistered(mesosscheduler.SchedulerDriver, *mesosproto.MasterInfo)
- func (c *Cluster) ResourceOffers(_ mesosscheduler.SchedulerDriver, offers []*mesosproto.Offer)
- func (c *Cluster) SlaveLost(mesosscheduler.SchedulerDriver, *mesosproto.SlaveID)
- func (c *Cluster) StatusUpdate(_ mesosscheduler.SchedulerDriver, taskStatus *mesosproto.TaskStatus)
- 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) Volume(name string) *cluster.Volume
- func (c *Cluster) Volumes() []*cluster.Volume
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 struct for mesos
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) 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 for container creation in Mesos task
func (*Cluster) CreateNetwork ¶ added in v1.0.0
func (c *Cluster) CreateNetwork(request *dockerclient.NetworkCreate) (*dockerclient.NetworkCreateResponse, 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) Disconnected ¶
func (c *Cluster) Disconnected(mesosscheduler.SchedulerDriver)
Disconnected method
func (*Cluster) Error ¶
func (c *Cluster) Error(d mesosscheduler.SchedulerDriver, msg string)
Error method
func (*Cluster) ExecutorLost ¶
func (c *Cluster) ExecutorLost(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, int)
ExecutorLost method
func (*Cluster) FrameworkMessage ¶
func (c *Cluster) FrameworkMessage(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, string)
FrameworkMessage method
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) Info ¶
Info gives minimal information about containers and resources on the mesos cluster
func (*Cluster) OfferRescinded ¶
func (c *Cluster) OfferRescinded(mesosscheduler.SchedulerDriver, *mesosproto.OfferID)
OfferRescinded method
func (*Cluster) Pull ¶
func (c *Cluster) Pull(name string, authConfig *dockerclient.AuthConfig, callback func(where, status string, err error))
Pull will pull images on the cluster nodes
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) Registered ¶
func (c *Cluster) Registered(driver mesosscheduler.SchedulerDriver, fwID *mesosproto.FrameworkID, masterInfo *mesosproto.MasterInfo)
Registered method for registered mesos framework
func (*Cluster) RemoveContainer ¶
RemoveContainer to remove containers on mesos cluster
func (*Cluster) RemoveImage ¶
func (c *Cluster) RemoveImage(image *cluster.Image) ([]*dockerclient.ImageDelete, error)
RemoveImage removes an image from the cluster
func (*Cluster) RemoveImages ¶
func (c *Cluster) RemoveImages(name string, force bool) ([]*dockerclient.ImageDelete, error)
RemoveImages removes images from the cluster
func (*Cluster) RemoveNetwork ¶ added in v1.0.0
RemoveNetwork removes network from the cluster
func (*Cluster) RemoveVolumes ¶ added in v1.0.0
RemoveVolumes removes volumes from the cluster
func (*Cluster) RenameContainer ¶
RenameContainer Rename a container
func (*Cluster) Reregistered ¶
func (c *Cluster) Reregistered(mesosscheduler.SchedulerDriver, *mesosproto.MasterInfo)
Reregistered method for registered mesos framework
func (*Cluster) ResourceOffers ¶
func (c *Cluster) ResourceOffers(_ mesosscheduler.SchedulerDriver, offers []*mesosproto.Offer)
ResourceOffers method
func (*Cluster) SlaveLost ¶
func (c *Cluster) SlaveLost(mesosscheduler.SchedulerDriver, *mesosproto.SlaveID)
SlaveLost method
func (*Cluster) StatusUpdate ¶
func (c *Cluster) StatusUpdate(_ mesosscheduler.SchedulerDriver, taskStatus *mesosproto.TaskStatus)
StatusUpdate method
func (*Cluster) TotalMemory ¶
TotalMemory return the total memory of the cluster