rule

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFuncInject

func NewFuncInject(f func(interface{}) error) *funcInject

func UpdateRules

func UpdateRules(s statesinformer.StatesInformer)

Types

type InjectOption

type InjectOption interface {
	Apply(interface{}) error
}

func WithParseFunc

func WithParseFunc(parseFunc ParseRuleFn) InjectOption

func WithSystemSupported

func WithSystemSupported(sysSupportFn SysSupportFn) InjectOption

func WithUpdateCallback

func WithUpdateCallback(updateCb UpdateCbFn) InjectOption

type ParseRuleFn

type ParseRuleFn func(nodeSLO *slov1alpha1.NodeSLOSpec) (bool, error)

type Rule

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

func Register

func Register(name, description string, injectOpts ...InjectOption) *Rule

type SysSupportFn

type SysSupportFn func() bool

type UpdateCbFn

type UpdateCbFn func(pods []*statesinformer.PodMeta) error

Jump to

Keyboard shortcuts

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