scheduler

package
Version: v0.0.0-...-5ae6e0f Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package scheduler implements the core scheduler of the system.

Index

Constants

View Source
const ForwardSchedulerName = "ForwardScheduler"
View Source
const NoSchedulingSchedulerName = "NoScheduler"
View Source
const PowerOfNSchedulerName = "PowerOfNScheduler"
View Source
const PowerOfNSchedulerTauName = "PowerOfNSchedulerTau"
View Source
const RoundRobinWithMasterSchedulerName = "RoundRobinWithMasterScheduler"

Variables

This section is empty.

Functions

func GetName

func GetName() string

func GetScheduler

func GetScheduler() *types.SchedulerDescriptor

func SetScheduler

func SetScheduler(sched *types.SchedulerDescriptor) error

func Start

func Start()

Types

type BadSchedulerParameters

type BadSchedulerParameters struct{}

func (BadSchedulerParameters) Error

func (e BadSchedulerParameters) Error() string

type CannotChangeScheduler

type CannotChangeScheduler struct{}

func (CannotChangeScheduler) Error

func (e CannotChangeScheduler) Error() string

type ExternalExecutionInfo

type ExternalExecutionInfo struct {
	PeersList []types.PeersListMember `json:"peers_list"`
}

type ForwardScheduler

type ForwardScheduler struct {
	MaxHops uint // maximum number of hops
}

This scheduler forward all of its jobs to a random node, this is used for testing purposes

func (ForwardScheduler) GetFullName

func (s ForwardScheduler) GetFullName() string

func (ForwardScheduler) GetScheduler

func (s ForwardScheduler) GetScheduler() *types.SchedulerDescriptor

func (ForwardScheduler) Schedule

func (s ForwardScheduler) Schedule(req *types.ServiceRequest) (*JobResult, error)

Schedule a service request. This call is blocking until the job has been executed locally or externally.

type JobCannotBeScheduled

type JobCannotBeScheduled struct {
	// contains filtered or unexported fields
}

func (JobCannotBeScheduled) Error

func (e JobCannotBeScheduled) Error() string

type JobResult

type JobResult struct {
	Response              *types.APIResponse    `json:"response"`
	ProbingMessages       uint                  `json:"probing_messages"`
	ExternalExecution     bool                  `json:"external_execution"`
	ExternalExecutionInfo ExternalExecutionInfo `json:"external_executed_info"`
	TimingsStart          *types.TimingsStart   `json:"timings_start"`
	Timings               *types.Timings        `json:"timings"`
}

func Schedule

func Schedule(req *types.ServiceRequest) (*JobResult, error)

type NoSchedulingScheduler

type NoSchedulingScheduler struct {
	Loss bool // do not use the queue
}

func (NoSchedulingScheduler) GetFullName

func (NoSchedulingScheduler) GetFullName() string

func (NoSchedulingScheduler) GetScheduler

func (NoSchedulingScheduler) Schedule

type PowerOfNScheduler

type PowerOfNScheduler struct {
	F       uint // fan-out
	T       uint // threshold
	Loss    bool // discard job if queue is full
	MaxHops uint // maximum number of hops
}

func (PowerOfNScheduler) GetFullName

func (s PowerOfNScheduler) GetFullName() string

func (PowerOfNScheduler) GetScheduler

func (s PowerOfNScheduler) GetScheduler() *types.SchedulerDescriptor

func (PowerOfNScheduler) Schedule

func (s PowerOfNScheduler) Schedule(req *types.ServiceRequest) (*JobResult, error)

Schedule a service request. This call is blocking until the job has been executed locally or externally.

type PowerOfNSchedulerTau

type PowerOfNSchedulerTau struct {
	F       uint          // fan-out
	T       uint          // threshold
	Loss    bool          // discard job if queue is full
	MaxHops uint          // maximum number of hops
	Tau     time.Duration // time to delay the probing
}

func (PowerOfNSchedulerTau) GetFullName

func (s PowerOfNSchedulerTau) GetFullName() string

func (PowerOfNSchedulerTau) GetScheduler

func (PowerOfNSchedulerTau) Schedule

Schedule a service request. This call is blocking until the job has been executed locally or externally.

type RoundRobinWithMasterScheduler

type RoundRobinWithMasterScheduler struct {
	Master   bool   // if current node is master
	MasterIP string // ip of master node
	Loss     bool   // discard job if queue is full
	// contains filtered or unexported fields
}

func (*RoundRobinWithMasterScheduler) GetFullName

func (s *RoundRobinWithMasterScheduler) GetFullName() string

func (*RoundRobinWithMasterScheduler) GetScheduler

func (*RoundRobinWithMasterScheduler) Schedule

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL