Documentation ¶
Index ¶
- type Mesos
- func (e *Mesos) Call(message *mesosproto.Call) error
- func (e *Mesos) DeclineOffer(offerIds []*mesosproto.OfferID) *mesosproto.Call
- func (e *Mesos) DecodeTask(key string) *cfg.Command
- func (e *Mesos) ForceSuppressFramework()
- func (e *Mesos) GetAgentInfo(agentID string) cfg.MesosSlaves
- func (e *Mesos) GetNetworkInfo(taskID string) []*mesosproto.NetworkInfo
- func (e *Mesos) GetOffer(offers *mesosproto.Event_Offers, cmd *cfg.Command) (*mesosproto.Offer, []*mesosproto.OfferID)
- func (e *Mesos) GetTaskInfo(taskID string) cfg.MesosTasks
- func (e *Mesos) IsRessourceMatched(ressource []*mesosproto.Resource, cmd *cfg.Command) bool
- func (e *Mesos) Kill(taskID string, agentID string) error
- func (e *Mesos) Revive()
- func (e *Mesos) SuppressFramework()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mesos ¶ added in v1.0.0
type Mesos struct { Config *cfg.Config Framework *cfg.FrameworkConfig IsSuppress bool IsRevive bool CountAgent int }
Mesos include all the current vars and global config
func New ¶ added in v1.0.0
func New(cfg *cfg.Config, frm *cfg.FrameworkConfig) *Mesos
New will create a new API object
func (*Mesos) Call ¶ added in v1.0.0
func (e *Mesos) Call(message *mesosproto.Call) error
Call will send messages to mesos
func (*Mesos) DeclineOffer ¶ added in v1.0.0
func (e *Mesos) DeclineOffer(offerIds []*mesosproto.OfferID) *mesosproto.Call
DeclineOffer will decline the given offers
func (*Mesos) DecodeTask ¶ added in v1.0.0
DecodeTask will decode the key into an mesos command struct
func (*Mesos) ForceSuppressFramework ¶ added in v1.0.0
func (e *Mesos) ForceSuppressFramework()
ForceSuppressFramework if all Tasks are running, suppress framework offers
func (*Mesos) GetAgentInfo ¶ added in v1.0.0
func (e *Mesos) GetAgentInfo(agentID string) cfg.MesosSlaves
GetAgentInfo get information about the agent
func (*Mesos) GetNetworkInfo ¶ added in v1.0.0
func (e *Mesos) GetNetworkInfo(taskID string) []*mesosproto.NetworkInfo
func (*Mesos) GetOffer ¶ added in v1.0.0
func (e *Mesos) GetOffer(offers *mesosproto.Event_Offers, cmd *cfg.Command) (*mesosproto.Offer, []*mesosproto.OfferID)
GetOffer get out the offer for the mesos task
func (*Mesos) GetTaskInfo ¶ added in v1.0.0
func (e *Mesos) GetTaskInfo(taskID string) cfg.MesosTasks
GetTaskInfo get the task object to the given ID
func (*Mesos) IsRessourceMatched ¶ added in v1.0.0
IsRessourceMatched - check if the ressources of the offer are matching the needs of the cmd nolint:gocyclo
func (*Mesos) Revive ¶ added in v1.0.0
func (e *Mesos) Revive()
Revive will revive the mesos tasks to clean up
func (*Mesos) SuppressFramework ¶ added in v1.0.0
func (e *Mesos) SuppressFramework()
SuppressFramework if all Tasks are running, suppress framework offers