Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPlacementConstrainer ¶
type MockPlacementConstrainer struct {
ResourceList map[resModel.ResourceKey]model.ExecutorID
}
MockPlacementConstrainer uses a resource executor binding map to implement PlacementConstrainer
func (*MockPlacementConstrainer) GetPlacementConstraint ¶
func (c *MockPlacementConstrainer) GetPlacementConstraint( _ context.Context, resourceKey resModel.ResourceKey, ) (resModel.ExecutorID, bool, error)
GetPlacementConstraint implements PlacementConstrainer.GetPlacementConstraint
type PlacementConstrainer ¶
type PlacementConstrainer interface { GetPlacementConstraint( ctx context.Context, resourceKey resModel.ResourceKey, ) (resModel.ExecutorID, bool, error) }
PlacementConstrainer describes an object that provides the placement constraint for an external resource.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler is a full set of scheduling management, containing capacity provider, real scheduler and resource placement manager.
func NewScheduler ¶
func NewScheduler( infoProvider executorInfoProvider, placementConstrainer PlacementConstrainer, ) *Scheduler
NewScheduler creates a new Scheduler instance
func (*Scheduler) ScheduleTask ¶
func (s *Scheduler) ScheduleTask( ctx context.Context, request *schedModel.SchedulerRequest, ) (*schedModel.SchedulerResponse, error)
ScheduleTask tries to assign an executor to a given task.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.