-
Notifications
You must be signed in to change notification settings - Fork 24
/
noop.go
30 lines (22 loc) · 1023 Bytes
/
noop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package components
import (
"github.com/fluxninja/aperture/pkg/config"
"github.com/fluxninja/aperture/pkg/notifiers"
"github.com/fluxninja/aperture/pkg/policies/controlplane/runtime"
)
// NoOp takes array of signals and emits noOpimum value.
type NoOp struct{}
// Make sure NoOp complies with Component interface.
var _ runtime.Component = (*NoOp)(nil)
// Name implements runtime.Component.
func (*NoOp) Name() string { return "NoOp" }
// Type implements runtime.Component.
func (*NoOp) Type() runtime.ComponentType { return runtime.ComponentTypeSignalProcessor }
// ShortDescription implements runtime.Component.
func (*NoOp) ShortDescription() string { return "" }
// Execute implements runtime.Component.Execute.
func (noOp *NoOp) Execute(inPortReadings runtime.PortToReading, tickInfo runtime.TickInfo) (runtime.PortToReading, error) {
return inPortReadings, nil
}
// DynamicConfigUpdate is a no-op for NoOp.
func (noOp *NoOp) DynamicConfigUpdate(event notifiers.Event, unmarshaller config.Unmarshaller) {}