Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // PreemptionPeriod is the period to check for tasks for preemption PreemptionPeriod time.Duration `yaml:"preemption_period"` // PreemptionDequeueLimit is the limit which task preemptor get the // tasks PreemptionDequeueLimit int `yaml:"preemption_dequeue_limit"` // DequeuePreemptionTimeout is the timeout value for task preemptor to // call GetPreemptibleTasks DequeuePreemptionTimeout int `yaml:"preemption_dequeue_timeout_ms"` }
Config is Task preemptor specific config
type Metrics ¶
type Metrics struct { TaskPreemptSuccess tally.Counter TaskPreemptFail tally.Counter GetPreemptibleTasks tally.Counter GetPreemptibleTasksFail tally.Counter GetPreemptibleTasksCallDuration tally.Timer }
Metrics is the struct containing all the counters that track internal state of task preemptor.
func NewMetrics ¶
NewMetrics returns a new Metrics struct, with all metrics initialized and rooted at the given tally.Scope
type Preemptor ¶
type Preemptor interface { // Start starts the task Preemptor goroutines Start() error // Stop stops the task Preemptor goroutines Stop() error }
Preemptor defines the interface of task preemptor which kills tasks from the preemption queue of resource manager
func New ¶
func New( d *yarpc.Dispatcher, resMgrClientName string, ormStore *ormobjects.Store, jobFactory cached.JobFactory, goalStateDriver goalstate.Driver, config *Config, parent tally.Scope, ) Preemptor
New create a new Task Preemptor
Click to show internal directories.
Click to hide internal directories.