Documentation ¶
Index ¶
- func CreateSchedulePolicy(config *configuration.Configuration) policies.SchedulingPolicy
- func RegisterSchedulePolicy(schedulePolicyName string, factory SchedulePolicyFactory)
- type SchedulePolicyFactory
- type Scheduler
- func (s *Scheduler) DebugSizeBytes() int
- func (s *Scheduler) IsWorking() bool
- func (s *Scheduler) Launch(ctx context.Context, fromBuyer *types.Node, offer *types.Offer, ...) ([]types.ContainerStatus, error)
- func (s *Scheduler) Start()
- func (s *Scheduler) Stop()
- func (s *Scheduler) SubmitContainers(ctx context.Context, contConfigs []types.ContainerConfig) ([]types.ContainerStatus, error)
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 (*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) 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.