scheduler

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 19 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
	Redis      *redis.Redis
	Kubernetes *controller.Controller
}

Scheduler include all the current vars and global config

func Subscribe

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

Subscribe to the mesos backend

func (*Scheduler) CheckState

func (e *Scheduler) CheckState()

CheckState check the current state of every task

func (*Scheduler) CreateK3SServerString

func (e *Scheduler) CreateK3SServerString()

CreateK3SServerString create the K3S_URL string

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 events 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 function for mesos

func (*Scheduler) HeartbeatLoop

func (e *Scheduler) HeartbeatLoop()

HeartbeatLoop - The main loop for the hearbeat

func (*Scheduler) ReconcileLoop

func (e *Scheduler) ReconcileLoop()

ReconcileLoop - The reconcile loop to check periodicly the task state

func (*Scheduler) StartDatastore

func (e *Scheduler) StartDatastore(taskID string)

StartDatastore is starting the datastore container

func (*Scheduler) StartK3SAgent

func (e *Scheduler) StartK3SAgent(taskID string)

StartK3SAgent is starting a agent container with the given IDs

func (*Scheduler) StartK3SServer

func (e *Scheduler) StartK3SServer(taskID string)

StartK3SServer Start K3S with the given id

Jump to

Keyboard shortcuts

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