scheduler

package
v0.0.0-...-38a8f93 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSchedulePolicy

func CreateSchedulePolicy(config *configuration.Configuration) policies.SchedulingPolicy

CreateSchedulePolicy creates a new schedule policy depending on the configurations.

func RegisterSchedulePolicy

func RegisterSchedulePolicy(schedulePolicyName string, factory SchedulePolicyFactory)

RegisterSchedulePolicy can be used to register a schedule policy in order to be available.

Types

type SchedulePolicyFactory

type SchedulePolicyFactory func() (policies.SchedulingPolicy, error)

SchedulePolicyFactory represents a method that creates a new scheduling policy method.

type Scheduler

type Scheduler struct {
	common.NodeComponent // Base component.
	// contains filtered or unexported fields
}

Scheduler is responsible for receiving local and remote requests for deploying containers to run in the system. It takes a request for running a container and decides where to deploy it in conjunction with the Discovery component.

func NewScheduler

func NewScheduler(config *configuration.Configuration, internalDisc discoveryLocal,
	containersManager containerManagerLocal, client userRemoteClient) *Scheduler

NewScheduler creates a new local scheduler component.

func (*Scheduler) DebugSizeBytes

func (s *Scheduler) DebugSizeBytes() int

func (*Scheduler) IsWorking

func (s *Scheduler) IsWorking() bool

func (*Scheduler) Launch

func (s *Scheduler) Launch(ctx context.Context, fromBuyer *types.Node, offer *types.Offer,
	containersConfigs []types.ContainerConfig) ([]types.ContainerStatus, error)

Launch is executed when a system's node wants to launch a container in this node.

func (*Scheduler) Start

func (s *Scheduler) Start()

func (*Scheduler) Stop

func (s *Scheduler) Stop()

func (*Scheduler) SubmitContainers

func (s *Scheduler) SubmitContainers(ctx context.Context, contConfigs []types.ContainerConfig) ([]types.ContainerStatus, error)

SubmitContainers is called when the user submits a request to the node in order to deploy a set of containers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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