rule

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 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(ruleType statesinformer.RegisterType, ruleObj interface{}, targets *statesinformer.CallbackTarget)

Types

type InjectOption

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

func WithParseFunc

func WithParseFunc(t statesinformer.RegisterType, parseFunc ParseRuleFn) InjectOption

func WithSystemSupported

func WithSystemSupported(sysSupportFn SysSupportFn) InjectOption

func WithUpdateCallback

func WithUpdateCallback(updateCb UpdateCbFn) InjectOption

type ParseRuleFn

type ParseRuleFn func(interface{}) (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(target *statesinformer.CallbackTarget) error

Jump to

Keyboard shortcuts

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