strategy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUPressureEviction

type CPUPressureEviction interface {
	Start(context.Context) (err error)
	Name() string
}

type CPUPressureLoadEviction

type CPUPressureLoadEviction struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*CPUPressureLoadEviction) GetTopEvictionPods

func (*CPUPressureLoadEviction) Name

func (p *CPUPressureLoadEviction) Name() string

func (*CPUPressureLoadEviction) Start

func (p *CPUPressureLoadEviction) Start(ctx context.Context) (err error)

func (*CPUPressureLoadEviction) ThresholdMet

type CPUPressureSuppression

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

func (*CPUPressureSuppression) GetEvictPods

func (*CPUPressureSuppression) Name

func (p *CPUPressureSuppression) Name() string

func (*CPUPressureSuppression) Start

type Entries

type Entries map[string]SubEntries

Entries are keyed by pod UID or pool name

type MetricInfo

type MetricInfo struct {
	Name       string
	Value      float64
	UpperBound float64
	LowerBound float64
}

type MetricRing

type MetricRing struct {
	MaxLen       int
	Queue        []*MetricSnapshot
	CurrentIndex int

	sync.RWMutex
}

func CreateMetricRing

func CreateMetricRing(size int) *MetricRing

func (*MetricRing) Count

func (ring *MetricRing) Count() (softOverCount, hardOverCount int)

func (*MetricRing) Push

func (ring *MetricRing) Push(snapShot *MetricSnapshot)

func (*MetricRing) Sum

func (ring *MetricRing) Sum() float64

type MetricSnapshot

type MetricSnapshot struct {
	Info MetricInfo
	Time int64
}

type PoolMetricCollectHandler

type PoolMetricCollectHandler func(metricName string, metricValue float64, _ *state.AllocationInfo, collectTime int64)

type SubEntries

type SubEntries map[string]*MetricRing

SubEntries is keyed by container name or empty string (for pool)

func (SubEntries) IsPoolEntry

func (se SubEntries) IsPoolEntry() bool

Jump to

Keyboard shortcuts

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