scheduler

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	Config          *cfg.Config
	Framework       *cfg.FrameworkConfig
	Mesos           mesos.Mesos
	Client          *http.Client
	Req             *http.Request
	API             *api.API
	Vault           *vault.Vault
	Redis           *redis.Redis
	ConnectionError bool
}

Scheduler include all the current vars and global config

func New

func New(cfg *cfg.Config, frm *cfg.FrameworkConfig) *Scheduler

New will create a new Scheduler object

func (*Scheduler) EventLoop

func (e *Scheduler) EventLoop()

EventLoop is the main loop for the mesos events.

func (*Scheduler) HandleOffers

func (e *Scheduler) HandleOffers(offers *mesosproto.Event_Offers) error

HandleOffers will handle the offers event of mesos

func (*Scheduler) HandleUpdate

func (e *Scheduler) HandleUpdate(event *mesosproto.Event) error

HandleUpdate will handle the offers event of mesos

func (*Scheduler) Heartbeat

func (e *Scheduler) Heartbeat()

Heartbeat - The Apache Mesos heatbeat function nolint:gocyclo

func (*Scheduler) HeartbeatLoop

func (e *Scheduler) HeartbeatLoop()

HeartbeatLoop - The main loop for the hearbeat

func (*Scheduler) PrepareTaskInfoExecuteContainer

func (e *Scheduler) PrepareTaskInfoExecuteContainer(agent mesosproto.AgentID, cmd cfg.Command) ([]mesosproto.TaskInfo, error)

PrepareTaskInfoExecuteContainer will create the TaskInfo Protobuf for Mesos nolint: gocyclo

func (*Scheduler) ReconcileLoop

func (e *Scheduler) ReconcileLoop()

ReconcileLoop - The reconcile loop to check periodicly the task state

Jump to

Keyboard shortcuts

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