Documentation
¶
Index ¶
- Constants
- type Component
- func (c *Component) GetInfo() module.ComponentInfo
- func (c *Component) Handle(_ context.Context, _ module.Handler, port string, _ any) any
- func (c *Component) Instance() module.Component
- func (c *Component) OnControl(ctx context.Context, msg any) error
- func (c *Component) OnReconcile(ctx context.Context, node v1alpha1.TinyNode) error
- func (c *Component) OnSettings(_ context.Context, msg any) error
- func (c *Component) Ports() []module.Port
- type Context
- type ControlRunning
- type ControlStopped
- type Settings
Constants ¶
View Source
const ( ComponentName = "cron" OutPort = "out" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
func (*Component) GetInfo ¶
func (c *Component) GetInfo() module.ComponentInfo
func (*Component) OnReconcile ¶ added in v0.2.0
OnReconcile restores schedule/context/error from metadata and resumes running state if the cron was previously active.
func (*Component) OnSettings ¶ added in v0.2.0
OnSettings receives settings from SettingsPort. Marks settingsFromPort so any later reconcile won't restore stale metadata over fresh values.
type ControlRunning ¶ added in v0.1.227
type ControlRunning struct {
Context Context `json:"context" required:"true" title:"Context" readonly:"true"`
Schedule string `json:"schedule" title:"Schedule" readonly:"true"`
NextRun string `json:"nextRun" title:"Next Run" 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 cron is running
type ControlStopped ¶ added in v0.1.227
type ControlStopped struct {
Context Context `json:"context" required:"true" title:"Context"`
Schedule string `json:"schedule" required:"true" title:"Schedule" description:"Cron expression"`
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 cron is not running
Click to show internal directories.
Click to hide internal directories.