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)
}

go:generate counterfeiter . ContainerManager

type ContainerMetricsSource

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

func (ContainerMetricsSource) CollectMetrics

type Enforcer

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

go:generate counterfeiter . Enforcer

type MemoryProvider

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

go:generate counterfeiter . MemoryProvider

type MetricsSource

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

go:generate counterfeiter . MetricsSource

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
}

go:generate counterfeiter . Runnable

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
throttlefakes Code generated by counterfeiter.