scheduler

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: GPL-3.0 Imports: 10 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 {
	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) IsWorking added in v0.3.0

func (scheduler *Scheduler) IsWorking() bool

func (*Scheduler) Launch

func (scheduler *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 (scheduler *Scheduler) Start()

func (*Scheduler) Stop

func (scheduler *Scheduler) Stop()

func (*Scheduler) SubmitContainers

func (scheduler *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.

Jump to

Keyboard shortcuts

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