runtime

package
v0.3.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MPL-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Package runtime implements the controller runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.3.0

type Option func(*Options)

Option is a functional option for controller runtime.

func WithChangeRateLimit added in v0.3.0

func WithChangeRateLimit(limit rate.Limit, burst int) Option

WithChangeRateLimit sets rate limit for changes performed by controllers.

This might be used to rate limit ill-behaving controllers from overloading the system with changes.

type Options added in v0.3.0

type Options struct {
	// ChangeRateLimit and ChangeBurst configure rate limiting of changes performed by controllers.
	ChangeRateLimit rate.Limit
	ChangeBurst     int
}

Options configures controller runtime.

func DefaultOptions added in v0.3.0

func DefaultOptions() Options

DefaultOptions returns default value of Options.

type Runtime

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

Runtime implements controller runtime.

func NewRuntime

func NewRuntime(st state.State, logger *zap.Logger, opt ...Option) (*Runtime, error)

NewRuntime initializes controller runtime object.

func (*Runtime) GetDependencyGraph

func (runtime *Runtime) GetDependencyGraph() (*controller.DependencyGraph, error)

GetDependencyGraph returns dependency graph between resources and controllers.

func (*Runtime) RegisterController

func (runtime *Runtime) RegisterController(ctrl controller.Controller) error

RegisterController registers new controller.

func (*Runtime) Run

func (runtime *Runtime) Run(ctx context.Context) error

Run all the controller loops.

Directories

Path Synopsis
Package dependency implements the dependency handling database.
Package dependency implements the dependency handling database.

Jump to

Keyboard shortcuts

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