Documentation ¶
Index ¶
- func NewAlerterAndOptions(alerterProto *policylangv1.Alerter, _ int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
- func NewArithmeticCombinatorAndOptions(arithmeticCombinatorProto *policylangv1.ArithmeticCombinator, _ int, ...) (runtime.Component, fx.Option, error)
- func NewConstant(value float64) runtime.Component
- func NewConstantAndOptions(constant *policylangv1.Constant, componentIndex int, ...) (runtime.Component, fx.Option, error)
- func NewDeciderAndOptions(deciderProto *policylangv1.Decider, _ int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
- func NewExtrapolatorAndOptions(extrapolatorProto *policylangv1.Extrapolator, componentIndex int, ...) (runtime.Component, fx.Option, error)
- func NewIntegrator() runtime.Component
- func NewIntegratorAndOptions(_ *policylangv1.Integrator, _ int, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewMaxAndOptions(maxProto *policylangv1.Max, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
- func NewMinAndOptions(minProto *policylangv1.Min, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
- func NewSqrtAndOptions(sqrtProto *policylangv1.Sqrt, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
- func NewSwitcherAndOptions(switcherProto *policylangv1.Switcher, componentIndex int, ...) (runtime.Component, fx.Option, error)
- type Alerter
- type ArithmeticCombinator
- func (arith *ArithmeticCombinator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (arith *ArithmeticCombinator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
- func (*ArithmeticCombinator) Name() string
- func (*ArithmeticCombinator) Type() runtime.ComponentType
- type Constant
- type Decider
- type EMA
- type Extrapolator
- func (exp *Extrapolator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (exp *Extrapolator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
- func (*Extrapolator) Name() string
- func (*Extrapolator) Type() runtime.ComponentType
- type FirstValid
- func (fv *FirstValid) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (fv *FirstValid) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
- func (*FirstValid) Name() string
- func (*FirstValid) Type() runtime.ComponentType
- type Integrator
- func (in *Integrator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (in *Integrator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
- func (*Integrator) Name() string
- func (*Integrator) Type() runtime.ComponentType
- type Max
- type Min
- type Sink
- type Sqrt
- type Switcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAlerterAndOptions ¶ added in v0.11.0
func NewAlerterAndOptions(alerterProto *policylangv1.Alerter, _ int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewAlerterAndOptions creates alerter and its fx options.
func NewArithmeticCombinatorAndOptions ¶
func NewArithmeticCombinatorAndOptions(arithmeticCombinatorProto *policylangv1.ArithmeticCombinator, _ int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewArithmeticCombinatorAndOptions returns a new ArithmeticCombinator and its Fx options.
func NewConstant ¶ added in v0.15.0
NewConstant creates a constant component with a given value.
func NewConstantAndOptions ¶
func NewConstantAndOptions(constant *policylangv1.Constant, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewConstantAndOptions creates a constant components and its fx options.
func NewDeciderAndOptions ¶
func NewDeciderAndOptions(deciderProto *policylangv1.Decider, _ int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewDeciderAndOptions creates timed controller and its fx options.
func NewExtrapolatorAndOptions ¶
func NewExtrapolatorAndOptions(extrapolatorProto *policylangv1.Extrapolator, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewExtrapolatorAndOptions creates a new Extrapolator Component.
func NewIntegrator ¶ added in v0.16.0
NewIntegrator creates an integrator component.
func NewIntegratorAndOptions ¶ added in v0.16.0
func NewIntegratorAndOptions(_ *policylangv1.Integrator, _ int, _ iface.Policy) (runtime.Component, fx.Option, error)
NewIntegratorAndOptions creates an integrator component and its fx options.
func NewMaxAndOptions ¶
func NewMaxAndOptions(maxProto *policylangv1.Max, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewMaxAndOptions creates a new Max Component.
func NewMinAndOptions ¶
func NewMinAndOptions(minProto *policylangv1.Min, componentIndex int, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewMinAndOptions creates a new Min Component.
Types ¶
type Alerter ¶ added in v0.11.0
type Alerter struct {
// contains filtered or unexported fields
}
Alerter is a component that monitors signal value and creates alert on true value.
func (*Alerter) DynamicConfigUpdate ¶ added in v0.11.0
func (a *Alerter) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Alerter.
func (*Alerter) Execute ¶ added in v0.11.0
func (a *Alerter) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Alerter) Type ¶ added in v0.14.0
func (*Alerter) Type() runtime.ComponentType
Type implements runtime.Component.
type ArithmeticCombinator ¶
type ArithmeticCombinator struct {
// contains filtered or unexported fields
}
ArithmeticCombinator takes lhs, rhs input signals and emits computed output via arithmetic operation.
func (*ArithmeticCombinator) DynamicConfigUpdate ¶ added in v0.4.0
func (arith *ArithmeticCombinator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for ArithmeticCombinator.
func (*ArithmeticCombinator) Execute ¶
func (arith *ArithmeticCombinator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*ArithmeticCombinator) Name ¶ added in v0.14.0
func (*ArithmeticCombinator) Name() string
Name implements runtime.Component.
func (*ArithmeticCombinator) Type ¶ added in v0.14.0
func (*ArithmeticCombinator) Type() runtime.ComponentType
Type implements runtime.Component.
type Constant ¶
type Constant struct {
// contains filtered or unexported fields
}
Constant is a constant signal.
func (*Constant) DynamicConfigUpdate ¶ added in v0.4.0
func (con *Constant) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Constant.
func (*Constant) Execute ¶
func (con *Constant) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Constant) Type ¶ added in v0.14.0
func (*Constant) Type() runtime.ComponentType
Type implements runtime.Component.
type Decider ¶
type Decider struct {
// contains filtered or unexported fields
}
Decider controller for testing.
func (*Decider) DynamicConfigUpdate ¶ added in v0.4.0
func (dec *Decider) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Decider.
func (*Decider) Execute ¶
func (dec *Decider) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Decider) Type ¶ added in v0.14.0
func (*Decider) Type() runtime.ComponentType
Type implements runtime.Component.
type EMA ¶
type EMA struct {
// contains filtered or unexported fields
}
EMA is an Exponential Moving Average filter.
func NewEMAAndOptions ¶
func NewEMAAndOptions(emaProto *policylangv1.EMA, _ int, policyReadAPI iface.Policy, ) (*EMA, fx.Option, error)
NewEMAAndOptions returns a new EMA filter and its Fx options.
func (*EMA) DynamicConfigUpdate ¶ added in v0.4.0
func (ema *EMA) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for EMA.
func (*EMA) Execute ¶
func (ema *EMA) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*EMA) Type ¶ added in v0.14.0
func (*EMA) Type() runtime.ComponentType
Type implements runtime.Component.
type Extrapolator ¶
type Extrapolator struct {
// contains filtered or unexported fields
}
Extrapolator takes an input signal and emits an output signal.
func (*Extrapolator) DynamicConfigUpdate ¶ added in v0.4.0
func (exp *Extrapolator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Extrapolator.
func (*Extrapolator) Execute ¶
func (exp *Extrapolator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Extrapolator) Name ¶ added in v0.14.0
func (*Extrapolator) Name() string
Name implements runtime.Component.
func (*Extrapolator) Type ¶ added in v0.14.0
func (*Extrapolator) Type() runtime.ComponentType
Type implements runtime.Component.
type FirstValid ¶ added in v0.5.1
type FirstValid struct{}
FirstValid picks the first valid input signal from the array of input signals and emits it as an output signal.
func NewFirstValidAndOptions ¶ added in v0.5.1
func NewFirstValidAndOptions(firstValidProto *policylangv1.FirstValid, componentIndex int, policyReadAPI iface.Policy) (*FirstValid, fx.Option, error)
NewFirstValidAndOptions creates a new FirstValid component and its Fx option.
func (*FirstValid) DynamicConfigUpdate ¶ added in v0.5.1
func (fv *FirstValid) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for FirstValid.
func (*FirstValid) Execute ¶ added in v0.5.1
func (fv *FirstValid) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*FirstValid) Name ¶ added in v0.14.0
func (*FirstValid) Name() string
Name implements runtime.Component.
func (*FirstValid) Type ¶ added in v0.14.0
func (*FirstValid) Type() runtime.ComponentType
Type implements runtime.Component.
type Integrator ¶ added in v0.16.0
type Integrator struct {
// contains filtered or unexported fields
}
Integrator is a component that accumulates sum of signal every tick.
func (*Integrator) DynamicConfigUpdate ¶ added in v0.16.0
func (in *Integrator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Integrator.
func (*Integrator) Execute ¶ added in v0.16.0
func (in *Integrator) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Integrator) Name ¶ added in v0.16.0
func (*Integrator) Name() string
Name implements runtime.Component.
func (*Integrator) Type ¶ added in v0.16.0
func (*Integrator) Type() runtime.ComponentType
Type implements runtime.Component.
type Max ¶
type Max struct{}
Max takes array of signals and emits maximum value.
func (*Max) DynamicConfigUpdate ¶ added in v0.4.0
func (max *Max) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Max.
func (*Max) Execute ¶
func (max *Max) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Max) Type ¶ added in v0.14.0
func (*Max) Type() runtime.ComponentType
Type implements runtime.Component.
type Min ¶
type Min struct{}
Min takes array of signals and emits minimum value.
func (*Min) DynamicConfigUpdate ¶ added in v0.4.0
func (min *Min) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Min.
func (*Min) Execute ¶
func (min *Min) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Min) Type ¶ added in v0.14.0
func (*Min) Type() runtime.ComponentType
Type implements runtime.Component.
type Sink ¶ added in v0.7.0
type Sink struct{}
Sink is a component that consumes array of input signals and does nothing with them.
func NewSinkAndOptions ¶ added in v0.7.0
func NewSinkAndOptions(sinkProto *policylangv1.Sink, componentIndex int, policyReadAPI iface.Policy) (*Sink, fx.Option, error)
NewSinkAndOptions creates a new Sink component.
func (*Sink) DynamicConfigUpdate ¶ added in v0.7.0
func (s *Sink) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Sink.
func (*Sink) Execute ¶ added in v0.7.0
func (s *Sink) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements Component interface.
func (*Sink) Type ¶ added in v0.14.0
func (*Sink) Type() runtime.ComponentType
Type implements runtime.Component.
type Sqrt ¶
type Sqrt struct {
// contains filtered or unexported fields
}
Sqrt takes an input signal and emits Square Root of it multiplied by scale as output.
func (*Sqrt) DynamicConfigUpdate ¶ added in v0.4.0
func (sqrt *Sqrt) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Sqrt.
func (*Sqrt) Execute ¶
func (sqrt *Sqrt) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Sqrt) Type ¶ added in v0.14.0
func (*Sqrt) Type() runtime.ComponentType
Type implements runtime.Component.
type Switcher ¶ added in v0.3.0
type Switcher struct{}
Switcher switches between two inputs based on third input.
func (*Switcher) DynamicConfigUpdate ¶ added in v0.4.0
func (dec *Switcher) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Switcher.
func (*Switcher) Execute ¶ added in v0.3.0
func (dec *Switcher) Execute(inPortReadings runtime.PortToValue, tickInfo runtime.TickInfo) (runtime.PortToValue, error)
Execute implements runtime.Component.Execute.
func (*Switcher) Type ¶ added in v0.14.0
func (*Switcher) Type() runtime.ComponentType
Type implements runtime.Component.