throttle

package
v0.0.0-...-d02b2c3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MB uint64 = 1024 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUCgroupEnforcer

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

func NewEnforcer

func NewEnforcer(cpuCgroupPath string) CPUCgroupEnforcer

func (CPUCgroupEnforcer) Punish

func (c CPUCgroupEnforcer) Punish(logger lager.Logger, handle string) error

func (CPUCgroupEnforcer) Release

func (c CPUCgroupEnforcer) Release(logger lager.Logger, handle string) error

type CompositeRunnable

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

func NewCompositeRunnable

func NewCompositeRunnable(runnables ...Runnable) CompositeRunnable

func (CompositeRunnable) Run

func (r CompositeRunnable) Run(logger lager.Logger) error

type ContainerManager

type ContainerManager interface {
	Handles() ([]string, error)
	Metrics(log lager.Logger, handle string) (gardener.ActualContainerMetrics, error)
}

type ContainerMetricsSource

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

func (ContainerMetricsSource) CollectMetrics

func (c ContainerMetricsSource) CollectMetrics(logger lager.Logger) (map[string]gardener.ActualContainerMetrics, error)

type Enforcer

type Enforcer interface {
	Punish(logger lager.Logger, handle string) error
	Release(logger lager.Logger, handle string) error
}

type MemoryProvider

type MemoryProvider interface {
	TotalMemory() (uint64, error)
}

type MetricsSource

type MetricsSource interface {
	CollectMetrics(logger lager.Logger) (map[string]gardener.ActualContainerMetrics, error)
}

func NewContainerMetricsSource

func NewContainerMetricsSource(containerManager ContainerManager) MetricsSource

type PollingService

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

func NewPollingService

func NewPollingService(
	logger lager.Logger,
	runnable Runnable,
	ticker <-chan time.Time,
) *PollingService

func (PollingService) Start

func (s PollingService) Start()

func (PollingService) Stop

func (s PollingService) Stop()

type Runnable

type Runnable interface {
	Run(logger lager.Logger) error
}

type SharesBalancer

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

func NewSharesBalancer

func NewSharesBalancer(cpuCgroupPath string, memoryProvider MemoryProvider, multiplier float64) SharesBalancer

func (SharesBalancer) Run

func (b SharesBalancer) Run(logger lager.Logger) error

type Throttler

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

func NewThrottler

func NewThrottler(metricsSource MetricsSource, enforcer Enforcer) Throttler

func (Throttler) Run

func (t Throttler) Run(logger lager.Logger) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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