autodetect

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAutoDetectTick = 2 * time.Minute
)

Variables

This section is empty.

Functions

func IsResourceAvailable

func IsResourceAvailable(gvk schema.GroupVersionKind) bool

IsResourceAvailable gets the state from state manager

Types

type Background

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

Background represents a procedure that runs in the background, periodically auto-detecting features

func NewAutoDetect

func NewAutoDetect(mgr manager.Manager, config DetectConfig) (*Background, error)

New creates a new auto-detect runner

func (*Background) DetectCapabilities

func (b *Background) DetectCapabilities()

DetectCapabilities populates state manager

func (*Background) Start

func (b *Background) Start()

Start initializes the auto-detection process that runs in the background

func (*Background) Stop

func (b *Background) Stop()

Stop causes the background process to stop auto detecting capabilities

type DetectConfig

type DetectConfig struct {
	GroupVersionKinds []schema.GroupVersionKind
	Delay             *time.Duration
	ExitOnChange      bool
}

Jump to

Keyboard shortcuts

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