Documentation
¶
Index ¶
- Constants
- type Component
- func (t *Component) GetInfo() module.ComponentInfo
- func (t *Component) Handle(_ context.Context, _ module.Handler, port string, _ any) module.Result
- func (t *Component) Instance() module.Component
- func (t *Component) OnControl(ctx context.Context, msg any) error
- func (t *Component) OnSettings(ctx context.Context, msg any) error
- func (t *Component) Ports() []module.Port
- type Context
- type Control
- type Settings
Constants ¶
const ( ComponentName = "signal" OutPort string = "out" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
func (*Component) GetInfo ¶
func (t *Component) GetInfo() module.ComponentInfo
func (*Component) OnControl ¶ added in v0.2.0
OnControl handles the Send button. It emits the payload once on Out and returns — no state, no Reset. The Out emit is a request/reply to the downstream pod; nothing here waits on or can stop it, so it runs detached on a background context.
func (*Component) OnSettings ¶ added in v0.2.0
OnSettings receives Settings from the SettingsPort, resolving any `{{secret:<name>/<key>}}` placeholders in Context against Kubernetes Secrets in the module pod's namespace (requires the module installed with secrets.enabled=true). Skipped if the K8s client hasn't arrived yet; the next settings message after OnClient re-resolves.
type Control ¶
type Control struct {
Context Context `json:"context" required:"true" title:"Context"`
Send bool `json:"send" format:"button" title:"Send" required:"true"`
}
Control is the _control port schema: a single Send button. Signal is a fire-and-forget trigger — there is no "running" state and no Reset, because the distributed runtime can't stop downstream work by cancelling a context (see [[distributed-control-plane]]). To stop something a Signal started, wire a Stop-capable component downstream (e.g. http_server's Stop port).