controller

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Run()
}

Controller provide a manager to control the distcc turbo behavior.

func NewController

func NewController(
	event types.RoleChangeEvent,
	conf *config.DistCCControllerConfig,
	ops store.Ops) Controller

NewController get a new Controller

type Operator

type Operator interface {
	Run(pCtx context.Context) error
}

Operator provide a manager to modify the distcc turbo settings.

func NewOperator

func NewOperator(
	conf *config.DistCCControllerConfig,
	ops store.Ops) Operator

NewOperator get a new Operator

type Strategy

type Strategy interface {
	Run(pCtx context.Context) error
}

Strategy provide a manager to decide the settings changes to distcc turbo settings.

func NewStrategy

func NewStrategy(
	conf *config.DistCCControllerConfig,
	ops store.Ops) Strategy

NewStrategy get a new strategy

type StrategyLevel

type StrategyLevel int

StrategyLevel describe the levels of strategy

const (
	StrategyNever StrategyLevel = iota
	Strategy1W10T
	Strategy2W20T
	Strategy1M30T
)

func (*StrategyLevel) GetCondition

func (sl *StrategyLevel) GetCondition() (limit int, lastSeconds int64)

GetCondition get the limit and last-time for a specific strategy level

func (*StrategyLevel) String

func (sl *StrategyLevel) String() string

String return the string of strategy level

type Watcher

type Watcher interface {
	Run(pCtx context.Context) error
}

Watcher provide a manager to watch the distcc turbo task status.

func NewWatcher

func NewWatcher(conf *config.DistCCControllerConfig, ops store.Ops) Watcher

NewWatcher get a new watcher

Jump to

Keyboard shortcuts

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