priorityoverride

package
v0.16.9-patch1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Provider

type Provider interface {
	Ready() bool
	Override(pool, queue string) (float64, bool, error)
}

Provider provides per-pool-per-queue priority overrides These can be used to override the priority of a given queue

func NewNoOpProvider

func NewNoOpProvider() Provider

func NewStaticProvider

func NewStaticProvider(overrides map[overrideKey]float64) Provider

type ServiceProvider

type ServiceProvider struct {
	// contains filtered or unexported fields
}

ServiceProvider is an implementation of Provider that fetches priority overrides from the Priority Overrides Service. We cache the overrides in memory so that we can continue scheduling even if the API is unavailable

func NewServiceProvider

func NewServiceProvider(apiClient priorityoverride.PriorityOverrideServiceClient, updateFrequency time.Duration) *ServiceProvider

func (*ServiceProvider) Override

func (p *ServiceProvider) Override(pool, queue string) (float64, bool, error)

func (*ServiceProvider) Ready

func (p *ServiceProvider) Ready() bool

func (*ServiceProvider) Run

type StaticProvider

type StaticProvider struct {
	// contains filtered or unexported fields
}

StaticProvider is Provider that loads priority overrides from a static map

func (*StaticProvider) Override

func (s *StaticProvider) Override(pool, queue string) (float64, bool, error)

func (*StaticProvider) Ready

func (s *StaticProvider) Ready() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL