mesos

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

func (e *Mesos) DecodeTask(key string) *cfg.Command

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

func (e *Mesos) IsRessourceMatched(ressource []*mesosproto.Resource, cmd *cfg.Command) bool

IsRessourceMatched - check if the ressources of the offer are matching the needs of the cmd nolint:gocyclo

func (*Mesos) Kill added in v1.0.0

func (e *Mesos) Kill(taskID string, agentID string) error

Kill a Task with the given taskID

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL