Documentation ¶
Index ¶
- Constants
- func AddNestedEgress(nestedCircuit *policylangv1.NestedCircuit, portName, signalName string)
- func AddNestedIngress(nestedCircuit *policylangv1.NestedCircuit, portName, signalName string)
- func ArithmeticOperatorStrings() []string
- func ComparisonOperatorStrings() []string
- func NewAlerterAndOptions(alerterProto *policylangv1.Alerter, componentID runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewAndAndOptions(_ *policylangv1.And, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewArithmeticCombinatorAndOptions(arithmeticCombinatorProto *policylangv1.ArithmeticCombinator, ...) (runtime.Component, fx.Option, error)
- func NewBoolVariableAndOptions(variableProto *policylangv1.BoolVariable, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewConstantSignal(value float64) runtime.Component
- func NewDeciderAndOptions(deciderProto *policylangv1.Decider, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewDifferentiator(diffProto *policylangv1.Differentiator) runtime.Component
- func NewDifferentiatorAndOptions(diffProto *policylangv1.Differentiator, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewExtrapolatorAndOptions(extrapolatorProto *policylangv1.Extrapolator, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewGradientControllerAndOptions(gradientControllerProto *policylangv1.GradientController, ...) (runtime.Component, fx.Option, error)
- func NewHolderAndOptions(holderProto *policylangv1.Holder, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewIntegratorAndOptions(integratorProto *policylangv1.Integrator, componentID runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewInverterAndOptions(_ *policylangv1.Inverter, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewMaxAndOptions(_ *policylangv1.Max, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewMinAndOptions(_ *policylangv1.Min, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewNestedSignalEgressAndOptions(nestedSignalEgressProto *policylangv1.NestedSignalEgress, ...) (runtime.Component, fx.Option, error)
- func NewNestedSignalIngressAndOptions(nestedSignalIngressProto *policylangv1.NestedSignalIngress, ...) (runtime.Component, fx.Option, error)
- func NewOrAndOptions(_ *policylangv1.Or, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewPIDControllerAndOptions(pidProto *policylangv1.PIDController, componentID runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewPolynomialRangeFunctionAndOptions(rangeFunctionProto *policylangv1.PolynomialRangeFunction, ...) (runtime.Component, fx.Option, error)
- func NewPulseGeneratorAndOptions(generatorProto *policylangv1.PulseGenerator, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewSignalGeneratorAndOptions(generatorProto *policylangv1.SignalGenerator, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewSwitcherAndOptions(_ *policylangv1.Switcher, componentID runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
- func NewUnaryOperatorAndOptions(unaryOperatorProto *policylangv1.UnaryOperator, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func NewVariableAndOptions(variableProto *policylangv1.Variable, _ runtime.ComponentID, ...) (runtime.Component, fx.Option, error)
- func UnaryOpStrings() []string
- type Alerter
- func (a *Alerter) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (a *Alerter) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Alerter) IsActuator() bool
- func (*Alerter) Name() string
- func (a *Alerter) ShortDescription() string
- func (*Alerter) Type() runtime.ComponentType
- type ArithmeticCombinator
- func (arith *ArithmeticCombinator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (arith *ArithmeticCombinator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*ArithmeticCombinator) IsActuator() bool
- func (*ArithmeticCombinator) Name() string
- func (arith *ArithmeticCombinator) ShortDescription() string
- func (*ArithmeticCombinator) Type() runtime.ComponentType
- type ArithmeticOperator
- type BoolVariable
- func (v *BoolVariable) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (v *BoolVariable) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*BoolVariable) IsActuator() bool
- func (*BoolVariable) Name() string
- func (v *BoolVariable) ShortDescription() string
- func (*BoolVariable) Type() runtime.ComponentType
- type ComparisonOperator
- type Decider
- func (dec *Decider) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (dec *Decider) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Decider) IsActuator() bool
- func (*Decider) Name() string
- func (dec *Decider) ShortDescription() string
- func (*Decider) Type() runtime.ComponentType
- type Differentiator
- func (d *Differentiator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (d *Differentiator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Differentiator) IsActuator() bool
- func (*Differentiator) Name() string
- func (d *Differentiator) ShortDescription() string
- func (*Differentiator) Type() runtime.ComponentType
- type EMA
- func (ema *EMA) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (ema *EMA) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*EMA) IsActuator() bool
- func (*EMA) Name() string
- func (ema *EMA) ShortDescription() string
- func (*EMA) Type() runtime.ComponentType
- type Extrapolator
- func (exp *Extrapolator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (exp *Extrapolator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Extrapolator) IsActuator() bool
- func (*Extrapolator) Name() string
- func (exp *Extrapolator) ShortDescription() string
- func (*Extrapolator) Type() runtime.ComponentType
- type FirstValid
- func (fv *FirstValid) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (fv *FirstValid) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*FirstValid) IsActuator() bool
- func (*FirstValid) Name() string
- func (*FirstValid) ShortDescription() string
- func (*FirstValid) Type() runtime.ComponentType
- type GradientController
- func (g *GradientController) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (g *GradientController) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (outPortReadings runtime.PortToReading, err error)
- func (g *GradientController) IsActuator() bool
- func (g *GradientController) Name() string
- func (g *GradientController) ShortDescription() string
- func (g *GradientController) Type() runtime.ComponentType
- type Holder
- func (*Holder) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (h *Holder) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Holder) IsActuator() bool
- func (*Holder) Name() string
- func (h *Holder) ShortDescription() string
- func (*Holder) Type() runtime.ComponentType
- type Integrator
- func (in *Integrator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (in *Integrator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (in *Integrator) GetJob() jobs.Job
- func (*Integrator) IsActuator() bool
- func (*Integrator) Name() string
- func (in *Integrator) NotifyCompletion()
- func (in *Integrator) ShortDescription() string
- func (*Integrator) Type() runtime.ComponentType
- type Max
- func (max *Max) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (max *Max) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Max) IsActuator() bool
- func (*Max) Name() string
- func (*Max) ShortDescription() string
- func (*Max) Type() runtime.ComponentType
- type Min
- func (min *Min) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (min *Min) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Min) IsActuator() bool
- func (*Min) Name() string
- func (*Min) ShortDescription() string
- func (*Min) Type() runtime.ComponentType
- type NestedSignalEgress
- type NestedSignalIngress
- type NoOp
- func (noOp *NoOp) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (noOp *NoOp) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*NoOp) IsActuator() bool
- func (*NoOp) Name() string
- func (*NoOp) ShortDescription() string
- func (*NoOp) Type() runtime.ComponentType
- type PIDController
- func (pid *PIDController) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (pid *PIDController) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (pid *PIDController) GetJob() jobs.Job
- func (*PIDController) IsActuator() bool
- func (*PIDController) Name() string
- func (pid *PIDController) NotifyCompletion()
- func (*PIDController) ShortDescription() string
- func (*PIDController) Type() runtime.ComponentType
- type PolynomialRangeFunction
- func (rangeFunc *PolynomialRangeFunction) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (rangeFunc *PolynomialRangeFunction) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*PolynomialRangeFunction) IsActuator() bool
- func (*PolynomialRangeFunction) Name() string
- func (rangeFunc *PolynomialRangeFunction) ShortDescription() string
- func (*PolynomialRangeFunction) Type() runtime.ComponentType
- type PulseGenerator
- func (*PulseGenerator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (pg *PulseGenerator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*PulseGenerator) IsActuator() bool
- func (*PulseGenerator) Name() string
- func (pg *PulseGenerator) ShortDescription() string
- func (*PulseGenerator) Type() runtime.ComponentType
- type SMA
- func (sma *SMA) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (sma *SMA) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*SMA) IsActuator() bool
- func (sma *SMA) Name() string
- func (sma *SMA) ShortDescription() string
- func (sma *SMA) Type() runtime.ComponentType
- type SignalGenerator
- func (*SignalGenerator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (sg *SignalGenerator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*SignalGenerator) IsActuator() bool
- func (*SignalGenerator) Name() string
- func (sg *SignalGenerator) ShortDescription() string
- func (*SignalGenerator) Type() runtime.ComponentType
- type Switcher
- func (dec *Switcher) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (dec *Switcher) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Switcher) IsActuator() bool
- func (*Switcher) Name() string
- func (*Switcher) ShortDescription() string
- func (*Switcher) Type() runtime.ComponentType
- type UnaryOp
- type UnaryOperator
- func (unaryOperator *UnaryOperator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (unaryOperator *UnaryOperator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*UnaryOperator) IsActuator() bool
- func (*UnaryOperator) Name() string
- func (unaryOperator *UnaryOperator) ShortDescription() string
- func (*UnaryOperator) Type() runtime.ComponentType
- type Variable
- func (v *Variable) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
- func (v *Variable) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
- func (*Variable) IsActuator() bool
- func (*Variable) Name() string
- func (v *Variable) ShortDescription() string
- func (*Variable) Type() runtime.ComponentType
Constants ¶
const NestedSignalPortName = "signal"
NestedSignalPortName is the port name for nested signal ingress and egress components.
Variables ¶
This section is empty.
Functions ¶
func AddNestedEgress ¶
func AddNestedEgress(nestedCircuit *policylangv1.NestedCircuit, portName, signalName string)
AddNestedEgress adds a nested egress to the nested circuit.
func AddNestedIngress ¶
func AddNestedIngress(nestedCircuit *policylangv1.NestedCircuit, portName, signalName string)
AddNestedIngress adds a nested ingress to the nested circuit.
func ArithmeticOperatorStrings ¶
func ArithmeticOperatorStrings() []string
ArithmeticOperatorStrings returns a slice of all String values of the enum
func ComparisonOperatorStrings ¶
func ComparisonOperatorStrings() []string
ComparisonOperatorStrings returns a slice of all String values of the enum
func NewAlerterAndOptions ¶
func NewAlerterAndOptions(alerterProto *policylangv1.Alerter, componentID runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewAlerterAndOptions creates alerter and its fx options.
func NewAndAndOptions ¶
func NewAndAndOptions( _ *policylangv1.And, _ runtime.ComponentID, _ iface.Policy, ) (runtime.Component, fx.Option, error)
NewAndAndOptions creates a new And Component.
func NewArithmeticCombinatorAndOptions ¶
func NewArithmeticCombinatorAndOptions(arithmeticCombinatorProto *policylangv1.ArithmeticCombinator, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewArithmeticCombinatorAndOptions returns a new ArithmeticCombinator and its Fx options.
func NewBoolVariableAndOptions ¶ added in v2.2.0
func NewBoolVariableAndOptions(variableProto *policylangv1.BoolVariable, _ runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewBoolVariableAndOptions creates a new BoolVariable component and its fx options.
func NewConstantSignal ¶
NewConstantSignal creates a variable component with a value that is always valid.
func NewDeciderAndOptions ¶
func NewDeciderAndOptions(deciderProto *policylangv1.Decider, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewDeciderAndOptions creates timed controller and its fx options.
func NewDifferentiator ¶
func NewDifferentiator(diffProto *policylangv1.Differentiator) runtime.Component
NewDifferentiator creates a differentiator component.
func NewDifferentiatorAndOptions ¶
func NewDifferentiatorAndOptions(diffProto *policylangv1.Differentiator, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewDifferentiatorAndOptions creates a differentiator component and its fx options.
func NewExtrapolatorAndOptions ¶
func NewExtrapolatorAndOptions(extrapolatorProto *policylangv1.Extrapolator, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewExtrapolatorAndOptions creates a new Extrapolator Component.
func NewGradientControllerAndOptions ¶ added in v2.22.0
func NewGradientControllerAndOptions( gradientControllerProto *policylangv1.GradientController, componentID runtime.ComponentID, policyReadAPI iface.Policy, ) (runtime.Component, fx.Option, error)
NewGradientControllerAndOptions creates a Gradient Controller Component and its fx options.
func NewHolderAndOptions ¶
func NewHolderAndOptions(holderProto *policylangv1.Holder, _ runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewHolderAndOptions creates a holder component and its fx options.
func NewIntegratorAndOptions ¶
func NewIntegratorAndOptions(integratorProto *policylangv1.Integrator, componentID runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewIntegratorAndOptions creates an integrator component and its fx options.
func NewInverterAndOptions ¶
func NewInverterAndOptions( _ *policylangv1.Inverter, _ runtime.ComponentID, _ iface.Policy, ) (runtime.Component, fx.Option, error)
NewInverterAndOptions creates a new Inverter Component.
func NewMaxAndOptions ¶
func NewMaxAndOptions(_ *policylangv1.Max, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewMaxAndOptions creates a new Max Component.
func NewMinAndOptions ¶
func NewMinAndOptions(_ *policylangv1.Min, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewMinAndOptions creates a new Min Component.
func NewNestedSignalEgressAndOptions ¶
func NewNestedSignalEgressAndOptions(nestedSignalEgressProto *policylangv1.NestedSignalEgress, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewNestedSignalEgressAndOptions creates a new NestedSignalEgress and its options.
func NewNestedSignalIngressAndOptions ¶
func NewNestedSignalIngressAndOptions(nestedSignalIngressProto *policylangv1.NestedSignalIngress, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewNestedSignalIngressAndOptions creates a new NestedSignalIngress and its options.
func NewOrAndOptions ¶
func NewOrAndOptions( _ *policylangv1.Or, _ runtime.ComponentID, _ iface.Policy, ) (runtime.Component, fx.Option, error)
NewOrAndOptions creates a new Or Component.
func NewPIDControllerAndOptions ¶ added in v2.14.0
func NewPIDControllerAndOptions( pidProto *policylangv1.PIDController, componentID runtime.ComponentID, policyReadAPI iface.Policy, ) (runtime.Component, fx.Option, error)
NewPIDControllerAndOptions creates a PID component and its fx options.
func NewPolynomialRangeFunctionAndOptions ¶ added in v2.17.0
func NewPolynomialRangeFunctionAndOptions(rangeFunctionProto *policylangv1.PolynomialRangeFunction, componentID runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewPolynomialRangeFunctionAndOptions returns a new PolynomialRangeFunction and its Fx options.
func NewPulseGeneratorAndOptions ¶
func NewPulseGeneratorAndOptions(generatorProto *policylangv1.PulseGenerator, _ runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewPulseGeneratorAndOptions creates an pulse generator component and its fx options.
func NewSignalGeneratorAndOptions ¶
func NewSignalGeneratorAndOptions(generatorProto *policylangv1.SignalGenerator, _ runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewSignalGeneratorAndOptions creates a signal generator component and its fx options.
func NewSwitcherAndOptions ¶
func NewSwitcherAndOptions(_ *policylangv1.Switcher, componentID runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewSwitcherAndOptions creates a new Switcher Component.
func NewUnaryOperatorAndOptions ¶
func NewUnaryOperatorAndOptions(unaryOperatorProto *policylangv1.UnaryOperator, _ runtime.ComponentID, _ iface.Policy) (runtime.Component, fx.Option, error)
NewUnaryOperatorAndOptions creates a new UnaryOperator Component.
func NewVariableAndOptions ¶
func NewVariableAndOptions(variableProto *policylangv1.Variable, _ runtime.ComponentID, policyReadAPI iface.Policy) (runtime.Component, fx.Option, error)
NewVariableAndOptions creates a variable components and its fx options.
func UnaryOpStrings ¶
func UnaryOpStrings() []string
UnaryOpStrings returns a slice of all String values of the enum
Types ¶
type Alerter ¶
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 ¶
func (a *Alerter) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Alerter.
func (*Alerter) Execute ¶
func (a *Alerter) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Alerter) IsActuator ¶
IsActuator implements runtime.Component.
func (*Alerter) ShortDescription ¶
ShortDescription implements runtime.Component.
func (*Alerter) Type ¶
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 ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*ArithmeticCombinator) IsActuator ¶
func (*ArithmeticCombinator) IsActuator() bool
IsActuator implements runtime.Component.
func (*ArithmeticCombinator) Name ¶
func (*ArithmeticCombinator) Name() string
Name implements runtime.Component.
func (*ArithmeticCombinator) ShortDescription ¶
func (arith *ArithmeticCombinator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*ArithmeticCombinator) Type ¶
func (*ArithmeticCombinator) Type() runtime.ComponentType
Type implements runtime.Component.
type ArithmeticOperator ¶
type ArithmeticOperator int8
ArithmeticOperator is the type of arithmetic operation.
const ( UnknownArithmetic ArithmeticOperator = iota Add Sub Mul Div Xor LShift RShift )
func ArithmeticOperatorString ¶
func ArithmeticOperatorString(s string) (ArithmeticOperator, error)
ArithmeticOperatorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ArithmeticOperatorValues ¶
func ArithmeticOperatorValues() []ArithmeticOperator
ArithmeticOperatorValues returns all values of the enum
func (ArithmeticOperator) IsAArithmeticOperator ¶
func (i ArithmeticOperator) IsAArithmeticOperator() bool
IsAArithmeticOperator returns "true" if the value is listed in the enum definition. "false" otherwise
func (ArithmeticOperator) String ¶
func (i ArithmeticOperator) String() string
type BoolVariable ¶ added in v2.2.0
type BoolVariable struct {
// contains filtered or unexported fields
}
BoolVariable is a dynamically configurable boolean variable signal.
func (*BoolVariable) DynamicConfigUpdate ¶ added in v2.2.0
func (v *BoolVariable) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate updates the boolean value when the configuration changes.
func (*BoolVariable) Execute ¶ added in v2.2.0
func (v *BoolVariable) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute executes the BoolVariable component and emits the current boolean value.
func (*BoolVariable) IsActuator ¶ added in v2.2.0
func (*BoolVariable) IsActuator() bool
IsActuator returns whether the BoolVariable component is an actuator.
func (*BoolVariable) Name ¶ added in v2.2.0
func (*BoolVariable) Name() string
Name returns the name of the BoolVariable component.
func (*BoolVariable) ShortDescription ¶ added in v2.2.0
func (v *BoolVariable) ShortDescription() string
ShortDescription returns a short description of the BoolVariable component.
func (*BoolVariable) Type ¶ added in v2.2.0
func (*BoolVariable) Type() runtime.ComponentType
Type returns the type of the BoolVariable component.
type ComparisonOperator ¶
type ComparisonOperator int8
ComparisonOperator is the type of comparison operator.
const ( UnknownComparison ComparisonOperator = iota GT LT GTE LTE EQ NEQ )
func ComparisonOperatorString ¶
func ComparisonOperatorString(s string) (ComparisonOperator, error)
ComparisonOperatorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ComparisonOperatorValues ¶
func ComparisonOperatorValues() []ComparisonOperator
ComparisonOperatorValues returns all values of the enum
func (ComparisonOperator) IsAComparisonOperator ¶
func (i ComparisonOperator) IsAComparisonOperator() bool
IsAComparisonOperator returns "true" if the value is listed in the enum definition. "false" otherwise
func (ComparisonOperator) String ¶
func (i ComparisonOperator) String() string
type Decider ¶
type Decider struct {
// contains filtered or unexported fields
}
Decider controller for testing.
func (*Decider) DynamicConfigUpdate ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Decider) IsActuator ¶
IsActuator implements runtime.Component.
func (*Decider) ShortDescription ¶
ShortDescription implements runtime.Component.
func (*Decider) Type ¶
func (*Decider) Type() runtime.ComponentType
Type implements runtime.Component.
type Differentiator ¶
type Differentiator struct {
// contains filtered or unexported fields
}
Differentiator is a component that calculates rate of change per tick.
func (*Differentiator) DynamicConfigUpdate ¶
func (d *Differentiator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Differentiator.
func (*Differentiator) Execute ¶
func (d *Differentiator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Differentiator) IsActuator ¶
func (*Differentiator) IsActuator() bool
IsActuator implements runtime.Component.
func (*Differentiator) Name ¶
func (*Differentiator) Name() string
Name implements runtime.Component.
func (*Differentiator) ShortDescription ¶
func (d *Differentiator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*Differentiator) Type ¶
func (*Differentiator) 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, _ runtime.ComponentID, policyReadAPI iface.Policy) (*EMA, fx.Option, error)
NewEMAAndOptions returns a new EMA filter and its Fx options.
func (*EMA) DynamicConfigUpdate ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*EMA) ShortDescription ¶
ShortDescription 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 ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Extrapolator) IsActuator ¶
func (*Extrapolator) IsActuator() bool
IsActuator implements runtime.Component.
func (*Extrapolator) ShortDescription ¶
func (exp *Extrapolator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*Extrapolator) Type ¶
func (*Extrapolator) Type() runtime.ComponentType
Type implements runtime.Component.
type FirstValid ¶
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 ¶
func NewFirstValidAndOptions(firstValidProto *policylangv1.FirstValid, _ runtime.ComponentID, policyReadAPI iface.Policy) (*FirstValid, fx.Option, error)
NewFirstValidAndOptions creates a new FirstValid component and its Fx option.
func (*FirstValid) DynamicConfigUpdate ¶
func (fv *FirstValid) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for FirstValid.
func (*FirstValid) Execute ¶
func (fv *FirstValid) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*FirstValid) IsActuator ¶
func (*FirstValid) IsActuator() bool
IsActuator implements runtime.Component.
func (*FirstValid) ShortDescription ¶
func (*FirstValid) ShortDescription() string
ShortDescription implements runtime.Component.
func (*FirstValid) Type ¶
func (*FirstValid) Type() runtime.ComponentType
Type implements runtime.Component.
type GradientController ¶ added in v2.22.0
type GradientController struct {
// contains filtered or unexported fields
}
GradientController describes gradient values.
func (*GradientController) DynamicConfigUpdate ¶ added in v2.22.0
func (g *GradientController) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate handles setting of controller.ControllerMode.
func (*GradientController) Execute ¶ added in v2.22.0
func (g *GradientController) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (outPortReadings runtime.PortToReading, err error)
Execute implements runtime.Component.Execute.
func (*GradientController) IsActuator ¶ added in v2.22.0
func (g *GradientController) IsActuator() bool
IsActuator implements runtime.Component.
func (*GradientController) Name ¶ added in v2.22.0
func (g *GradientController) Name() string
Name implements runtime.Component.
func (*GradientController) ShortDescription ¶ added in v2.22.0
func (g *GradientController) ShortDescription() string
ShortDescription implements runtime.Component.
func (*GradientController) Type ¶ added in v2.22.0
func (g *GradientController) Type() runtime.ComponentType
Type implements runtime.Component.
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
Holder is a component that holds the last valid signal value for the specified duration then waits for next valid value to hold.
func (*Holder) DynamicConfigUpdate ¶
func (*Holder) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Holder.
func (*Holder) Execute ¶
func (h *Holder) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Holder) IsActuator ¶
IsActuator implements runtime.Component.
func (*Holder) ShortDescription ¶
ShortDescription implements runtime.Component.
func (*Holder) Type ¶
func (*Holder) Type() runtime.ComponentType
Type implements runtime.Component.
type Integrator ¶
type Integrator struct {
// contains filtered or unexported fields
}
Integrator is a component that accumulates sum of signal every tick.
func (*Integrator) DynamicConfigUpdate ¶
func (in *Integrator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Integrator.
func (*Integrator) Execute ¶
func (in *Integrator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Integrator) GetJob ¶ added in v2.15.0
func (in *Integrator) GetJob() jobs.Job
GetJob implements runtime.BackgroundJob.GetJob.
func (*Integrator) IsActuator ¶
func (*Integrator) IsActuator() bool
IsActuator implements runtime.Component.
func (*Integrator) NotifyCompletion ¶ added in v2.15.0
func (in *Integrator) NotifyCompletion()
NotifyCompletion implements runtime.BackgroundJob.NotifyCompletion.
func (*Integrator) ShortDescription ¶
func (in *Integrator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*Integrator) Type ¶
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 ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Max) ShortDescription ¶
ShortDescription implements runtime.Component.
type Min ¶
type Min struct{}
Min takes array of signals and emits minimum value.
func (*Min) DynamicConfigUpdate ¶
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.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Min) ShortDescription ¶
ShortDescription implements runtime.Component.
type NestedSignalEgress ¶
type NestedSignalEgress struct {
// contains filtered or unexported fields
}
NestedSignalEgress is a component that ingresses a signal into a nested circuit.
func (*NestedSignalEgress) Name ¶
func (nse *NestedSignalEgress) Name() string
Name returns the name of the component.
type NestedSignalIngress ¶
type NestedSignalIngress struct {
// contains filtered or unexported fields
}
NestedSignalIngress is a component that ingresses a signal into a nested circuit.
func (*NestedSignalIngress) Name ¶
func (nsi *NestedSignalIngress) Name() string
Name returns the name of the component.
type NoOp ¶
type NoOp struct{}
NoOp takes array of signals and emits noOpimum value.
func (*NoOp) DynamicConfigUpdate ¶
func (noOp *NoOp) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for NoOp.
func (*NoOp) Execute ¶
func (noOp *NoOp) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*NoOp) ShortDescription ¶
ShortDescription implements runtime.Component.
type PIDController ¶ added in v2.14.0
type PIDController struct {
// contains filtered or unexported fields
}
PIDController .
func (*PIDController) DynamicConfigUpdate ¶ added in v2.14.0
func (pid *PIDController) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for PID.
func (*PIDController) Execute ¶ added in v2.14.0
func (pid *PIDController) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*PIDController) GetJob ¶ added in v2.15.0
func (pid *PIDController) GetJob() jobs.Job
GetJob implements runtime.BackgroundJob.GetJob.
func (*PIDController) IsActuator ¶ added in v2.14.0
func (*PIDController) IsActuator() bool
IsActuator implements runtime.Component.
func (*PIDController) Name ¶ added in v2.14.0
func (*PIDController) Name() string
Name implements runtime.Component.
func (*PIDController) NotifyCompletion ¶ added in v2.15.0
func (pid *PIDController) NotifyCompletion()
NotifyCompletion implements runtime.BackgroundJob.NotifyCompletion.
func (*PIDController) ShortDescription ¶ added in v2.14.0
func (*PIDController) ShortDescription() string
ShortDescription implements runtime.Component.
func (*PIDController) Type ¶ added in v2.14.0
func (*PIDController) Type() runtime.ComponentType
Type implements runtime.Component.
type PolynomialRangeFunction ¶ added in v2.17.0
type PolynomialRangeFunction struct {
// contains filtered or unexported fields
}
PolynomialRangeFunction .
func (*PolynomialRangeFunction) DynamicConfigUpdate ¶ added in v2.17.0
func (rangeFunc *PolynomialRangeFunction) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for PolynomialRangeFunction.
func (*PolynomialRangeFunction) Execute ¶ added in v2.17.0
func (rangeFunc *PolynomialRangeFunction) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*PolynomialRangeFunction) IsActuator ¶ added in v2.17.0
func (*PolynomialRangeFunction) IsActuator() bool
IsActuator implements runtime.Component.
func (*PolynomialRangeFunction) Name ¶ added in v2.17.0
func (*PolynomialRangeFunction) Name() string
Name implements runtime.Component.
func (*PolynomialRangeFunction) ShortDescription ¶ added in v2.17.0
func (rangeFunc *PolynomialRangeFunction) ShortDescription() string
ShortDescription implements runtime.Component.
func (*PolynomialRangeFunction) Type ¶ added in v2.17.0
func (*PolynomialRangeFunction) Type() runtime.ComponentType
Type implements runtime.Component.
type PulseGenerator ¶
type PulseGenerator struct {
// contains filtered or unexported fields
}
PulseGenerator is a component that accumulates sum of signal every tick.
func (*PulseGenerator) DynamicConfigUpdate ¶
func (*PulseGenerator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for PulseGenerator.
func (*PulseGenerator) Execute ¶
func (pg *PulseGenerator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*PulseGenerator) IsActuator ¶
func (*PulseGenerator) IsActuator() bool
IsActuator implements runtime.Component.
func (*PulseGenerator) Name ¶
func (*PulseGenerator) Name() string
Name implements runtime.Component.
func (*PulseGenerator) ShortDescription ¶
func (pg *PulseGenerator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*PulseGenerator) Type ¶
func (*PulseGenerator) Type() runtime.ComponentType
Type implements runtime.Component.
type SMA ¶
type SMA struct {
// contains filtered or unexported fields
}
SMA is a Simple Moving Average filter.
func NewSMAAndOptions ¶
func NewSMAAndOptions(smaProto *policylangv1.SMA, _ runtime.ComponentID, policyReadAPI iface.Policy) (*SMA, fx.Option, error)
NewSMAAndOptions returns a new SMA filter and its Fx options.
func (*SMA) DynamicConfigUpdate ¶
func (sma *SMA) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for SMA.
func (*SMA) Execute ¶
func (sma *SMA) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*SMA) IsActuator ¶
IsActuator returns whether this component is a actuator or not.
func (*SMA) ShortDescription ¶
ShortDescription returns a short description of the component.
func (*SMA) Type ¶
func (sma *SMA) Type() runtime.ComponentType
Type returns the type of the component.
type SignalGenerator ¶
type SignalGenerator struct {
// contains filtered or unexported fields
}
SignalGenerator generates a signal based on the steps specified.
func (*SignalGenerator) DynamicConfigUpdate ¶
func (*SignalGenerator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for SignalGenerator.
func (*SignalGenerator) Execute ¶
func (sg *SignalGenerator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*SignalGenerator) IsActuator ¶
func (*SignalGenerator) IsActuator() bool
IsActuator implements runtime.Component.
func (*SignalGenerator) Name ¶
func (*SignalGenerator) Name() string
Name implements runtime.Component.
func (*SignalGenerator) ShortDescription ¶
func (sg *SignalGenerator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*SignalGenerator) Type ¶
func (*SignalGenerator) Type() runtime.ComponentType
Type implements runtime.Component.
type Switcher ¶
type Switcher struct {
// contains filtered or unexported fields
}
Switcher switches between two inputs based on third input.
func (*Switcher) DynamicConfigUpdate ¶
func (dec *Switcher) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for Switcher.
func (*Switcher) Execute ¶
func (dec *Switcher) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Switcher) IsActuator ¶
IsActuator implements runtime.Component.
func (*Switcher) ShortDescription ¶
ShortDescription implements runtime.Component.
func (*Switcher) Type ¶
func (*Switcher) Type() runtime.ComponentType
Type implements runtime.Component.
type UnaryOp ¶
type UnaryOp int8
UnaryOp is the type of unary operation.
func UnaryOpString ¶
UnaryOpString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (UnaryOp) IsAUnaryOp ¶
IsAUnaryOp returns "true" if the value is listed in the enum definition. "false" otherwise
type UnaryOperator ¶
type UnaryOperator struct {
// contains filtered or unexported fields
}
UnaryOperator takes an input signal and emits Square Root of it multiplied by scale as output.
func (*UnaryOperator) DynamicConfigUpdate ¶
func (unaryOperator *UnaryOperator) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate is a no-op for UnaryOperator.
func (*UnaryOperator) Execute ¶
func (unaryOperator *UnaryOperator) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*UnaryOperator) IsActuator ¶
func (*UnaryOperator) IsActuator() bool
IsActuator implements runtime.Component.
func (*UnaryOperator) ShortDescription ¶
func (unaryOperator *UnaryOperator) ShortDescription() string
ShortDescription implements runtime.Component.
func (*UnaryOperator) Type ¶
func (*UnaryOperator) Type() runtime.ComponentType
Type implements runtime.Component.
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
Variable is a dynamically configurable variable signal.
func (*Variable) DynamicConfigUpdate ¶
func (v *Variable) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller)
DynamicConfigUpdate finds the dynamic config and syncs the constant value.
func (*Variable) Execute ¶
func (v *Variable) Execute(inPortReadings runtime.PortToReading, circuitAPI runtime.CircuitAPI) (runtime.PortToReading, error)
Execute implements runtime.Component.Execute.
func (*Variable) IsActuator ¶
IsActuator implements runtime.Component.
func (*Variable) ShortDescription ¶
ShortDescription implements runtime.Component.
func (*Variable) Type ¶
func (*Variable) Type() runtime.ComponentType
Type implements runtime.Component.
Source Files ¶
- alerter.go
- arithmetic-combinator.go
- arithmetic-operator-string.go
- bool-variable.go
- decider-comparison-operator-string.go
- decider.go
- differentiator.go
- ema.go
- extrapolator.go
- first-valid.go
- gradient-controller.go
- holder.go
- integrator.go
- logical.go
- max.go
- min.go
- nested-circuit-helpers.go
- nested-signal.go
- noop.go
- pid-controller.go
- polynomial-range-function.go
- pulse-generator.go
- signal-generator.go
- sma.go
- switcher.go
- unary-op-string.go
- unary-operator.go
- variable.go