Documentation
¶
Index ¶
- type Scheduler
- func (scheduler *Scheduler) IsWorking() bool
- func (scheduler *Scheduler) Launch(ctx context.Context, fromBuyer *types.Node, offer *types.Offer, ...) ([]types.ContainerStatus, error)
- func (scheduler *Scheduler) Start()
- func (scheduler *Scheduler) Stop()
- func (scheduler *Scheduler) SubmitContainers(ctx context.Context, contConfigs []types.ContainerConfig) ([]types.ContainerStatus, error)
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) 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) 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.
Click to show internal directories.
Click to hide internal directories.