Documentation ¶
Index ¶
- func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, master string, ...) (cluster.Cluster, error)
- type Cluster
- func (c *Cluster) BuildImage(buildImage *types.ImageBuildOptions, 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, authConfig *types.AuthConfig) (*cluster.Container, error)
- func (c *Cluster) CreateNetwork(request *types.NetworkCreate) (*types.NetworkCreateResponse, error)
- func (c *Cluster) CreateVolume(request *types.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() [][2]string
- func (c *Cluster) LaunchTask(t *task.Task) bool
- 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 *types.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) RemoveImage(image *cluster.Image) ([]types.ImageDelete, error)
- func (c *Cluster) RemoveImages(name string, force bool) ([]types.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) StartContainer(container *cluster.Container, hostConfig *dockerclient.HostConfig) error
- func (c *Cluster) TagImage(IDOrName string, repo string, tag string, force bool) error
- func (c *Cluster) TotalCpus() int
- func (c *Cluster) TotalMemory() int64
- func (c *Cluster) UnregisterEventHandler(h cluster.EventHandler)
- func (c *Cluster) Volumes() cluster.Volumes
- type Scheduler
- func (s *Scheduler) Disconnected(mesosscheduler.SchedulerDriver)
- func (s *Scheduler) Error(d mesosscheduler.SchedulerDriver, msg string)
- func (s *Scheduler) ExecutorLost(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, ...)
- func (s *Scheduler) FrameworkMessage(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, ...)
- func (s *Scheduler) OfferRescinded(_ mesosscheduler.SchedulerDriver, offerID *mesosproto.OfferID)
- func (s *Scheduler) Registered(driver mesosscheduler.SchedulerDriver, fwID *mesosproto.FrameworkID, ...)
- func (s *Scheduler) Reregistered(mesosscheduler.SchedulerDriver, *mesosproto.MasterInfo)
- func (s *Scheduler) ResourceOffers(_ mesosscheduler.SchedulerDriver, offers []*mesosproto.Offer)
- func (s *Scheduler) SlaveLost(mesosscheduler.SchedulerDriver, *mesosproto.SlaveID)
- func (s *Scheduler) StatusUpdate(_ mesosscheduler.SchedulerDriver, taskStatus *mesosproto.TaskStatus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCluster ¶
func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, master string, options cluster.DriverOpts, engineOptions *cluster.EngineOpts) (cluster.Cluster, error)
NewCluster for mesos Cluster creation
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
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 for container creation in Mesos task
func (*Cluster) CreateNetwork ¶ added in v1.0.0
func (c *Cluster) CreateNetwork(request *types.NetworkCreate) (*types.NetworkCreateResponse, 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 ¶
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) LaunchTask ¶ added in v1.1.0
LaunchTask selects node and calls driver to launch a task
func (*Cluster) Pull ¶
func (c *Cluster) Pull(name string, authConfig *types.AuthConfig, callback func(where, status string, err error))
Pull pulls 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) RemoveContainer ¶
RemoveContainer removes containers on mesos cluster
func (*Cluster) RemoveImage ¶
RemoveImage removes an image from the cluster
func (*Cluster) RemoveImages ¶
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 renames a container
func (*Cluster) StartContainer ¶ added in v1.1.0
func (c *Cluster) StartContainer(container *cluster.Container, hostConfig *dockerclient.HostConfig) error
StartContainer starts a container
func (*Cluster) TotalMemory ¶
TotalMemory returns 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.
type Scheduler ¶ added in v1.1.0
Scheduler structure for mesos driver
func NewScheduler ¶ added in v1.1.0
func NewScheduler(config mesosscheduler.DriverConfig, cluster *Cluster, sched *scheduler.Scheduler) (*Scheduler, error)
NewScheduler for Scheduler mesos driver creation
func (*Scheduler) Disconnected ¶ added in v1.1.0
func (s *Scheduler) Disconnected(mesosscheduler.SchedulerDriver)
Disconnected method
func (*Scheduler) Error ¶ added in v1.1.0
func (s *Scheduler) Error(d mesosscheduler.SchedulerDriver, msg string)
Error method
func (*Scheduler) ExecutorLost ¶ added in v1.1.0
func (s *Scheduler) ExecutorLost(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, int)
ExecutorLost method
func (*Scheduler) FrameworkMessage ¶ added in v1.1.0
func (s *Scheduler) FrameworkMessage(mesosscheduler.SchedulerDriver, *mesosproto.ExecutorID, *mesosproto.SlaveID, string)
FrameworkMessage method
func (*Scheduler) OfferRescinded ¶ added in v1.1.0
func (s *Scheduler) OfferRescinded(_ mesosscheduler.SchedulerDriver, offerID *mesosproto.OfferID)
OfferRescinded method
func (*Scheduler) Registered ¶ added in v1.1.0
func (s *Scheduler) Registered(driver mesosscheduler.SchedulerDriver, fwID *mesosproto.FrameworkID, masterInfo *mesosproto.MasterInfo)
Registered method for registered mesos framework
func (*Scheduler) Reregistered ¶ added in v1.1.0
func (s *Scheduler) Reregistered(mesosscheduler.SchedulerDriver, *mesosproto.MasterInfo)
Reregistered method for registered mesos framework
func (*Scheduler) ResourceOffers ¶ added in v1.1.0
func (s *Scheduler) ResourceOffers(_ mesosscheduler.SchedulerDriver, offers []*mesosproto.Offer)
ResourceOffers method
func (*Scheduler) SlaveLost ¶ added in v1.1.0
func (s *Scheduler) SlaveLost(mesosscheduler.SchedulerDriver, *mesosproto.SlaveID)
SlaveLost method
func (*Scheduler) StatusUpdate ¶ added in v1.1.0
func (s *Scheduler) StatusUpdate(_ mesosscheduler.SchedulerDriver, taskStatus *mesosproto.TaskStatus)
StatusUpdate method