Add SchedulerAlgorithm to SchedulerConfig

This commit is contained in:
Charlie Voiselle
2020-04-03 19:03:14 -04:00
committed by Mahmood Ali
parent 1bb731bdc5
commit 6571ccefbc
4 changed files with 46 additions and 0 deletions

View File

@@ -112,7 +112,11 @@ func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error {
return nil
}
// SchedulerConfiguration is the config for controlling scheduler behavior
type SchedulerConfiguration struct {
// SchedulerAlgorithm lets you select between available scheduling algorithms.
SchedulerAlgorithm string
// PreemptionConfig specifies whether to enable eviction of lower
// priority jobs to place higher priority jobs.
PreemptionConfig PreemptionConfig
@@ -140,6 +144,11 @@ type SchedulerSetConfigurationResponse struct {
WriteMeta
}
// SchedulerAlgorithm is an enum string that encapsulates the valid options for a
// SchedulerConfiguration stanza's SchedulerAlgorithm. These modes will allow the
// scheduler to be user-selectable.
type SchedulerAlgorithm string
// PreemptionConfig specifies whether preemption is enabled based on scheduler type
type PreemptionConfig struct {
SystemSchedulerEnabled bool