ticker

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName        = "ticker"
	OutPort       string = "out"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	module.Base
	// contains filtered or unexported fields
}

func (*Component) GetInfo

func (t *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (t *Component) Handle(_ context.Context, _ module.Handler, port string, _ any) any

Handle is unreachable for ticker — every port the component declares is either system (dispatched via capabilities) or source (emit-only). The stub guards against accidental routing.

func (*Component) Instance

func (t *Component) Instance() module.Component

func (*Component) OnControl added in v0.2.0

func (t *Component) OnControl(ctx context.Context, msg any) error

OnControl handles Start/Stop dashboard clicks.

func (*Component) OnDestroy added in v0.1.195

func (t *Component) OnDestroy(_ map[string]string)

func (*Component) OnReconcile added in v0.2.0

func (t *Component) OnReconcile(ctx context.Context, node v1alpha1.TinyNode) error

OnReconcile restores running state from node metadata if a previous instance was emitting before pod restart.

func (*Component) OnSettings added in v0.2.0

func (t *Component) OnSettings(_ context.Context, msg any) error

OnSettings receives settings from the SettingsPort. Marks settingsFromPort so a later reconcile won't restore stale metadata over fresh values. Preserves the existing in-memory Context if a control click set it before the CRD-driven settings catch up.

func (*Component) Ports

func (t *Component) Ports() []module.Port

type Context

type Context any

type ControlRunning added in v0.1.215

type ControlRunning struct {
	Context Context `json:"context" required:"true" title:"Context" readonly:"true"`
	Status  string  `json:"status" title:"Status" readonly:"true"`
	Stop    bool    `json:"stop" format:"button" title:"Stop" required:"true"`
}

ControlRunning is the _control port schema when the ticker is running

type ControlStopped added in v0.1.215

type ControlStopped struct {
	Context Context `json:"context" required:"true" title:"Context"`
	Status  string  `json:"status" title:"Status" readonly:"true"`
	Start   bool    `json:"start" format:"button" title:"Start" required:"true"`
}

ControlStopped is the _control port schema when the ticker is not running

type Settings

type Settings struct {
	Context Context `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to be send each period of time"`
	Delay   int     `json:"delay" required:"true" title:"Delay (ms)" description:"Delay between signals" minimum:"0" default:"1000"`
}

Jump to

Keyboard shortcuts

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