Documentation
¶
Index ¶
- Constants
- type Component
- func (c *Component) GetInfo() module.ComponentInfo
- func (c *Component) Handle(ctx context.Context, handler module.Handler, port string, msg any) module.Result
- func (c *Component) Instance() module.Component
- func (c *Component) OnReconcile(_ context.Context, _ v1alpha1.TinyNode) error
- func (c *Component) OnSettings(_ context.Context, msg any) error
- func (c *Component) Ports() []module.Port
- type Context
- type ErrorMessage
- type InMessage
- type OutMessage
- type Settings
Constants ¶
View Source
const ( ComponentName = "collect" ItemPort = "item" ResponsePort = "response" ErrorPort = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
Component buffers fanned-out items per group key in the node's State (survives restarts; multi-replica safe — same backing as kv) and emits the reassembled array once all items of a group have arrived.
func (*Component) GetInfo ¶
func (c *Component) GetInfo() module.ComponentInfo
func (*Component) OnReconcile ¶
OnReconcile is a no-op: the State backend handles cache freshness.
func (*Component) OnSettings ¶
OnSettings receives Settings from the SettingsPort.
type Context ¶
type Context any
Context is the passthrough payload. The group's Response carries the context of the LAST item to arrive for that group.
type ErrorMessage ¶
type ErrorMessage struct {
Context Context `json:"context,omitempty" title:"Context" description:"Context of the group's last arriving item."`
GroupKey string `json:"groupKey" title:"Group Key"`
Received int `json:"received" title:"Received"`
Total int `json:"total" title:"Total"`
Error string `json:"error" title:"Error"`
}
ErrorMessage reports a group that timed out before completing.
type InMessage ¶
type InMessage struct {
Context Context `` /* 163-byte string literal not displayed */
GroupKey string `` /* 243-byte string literal not displayed */
Index int `` /* 180-byte string literal not displayed */
Total int `` /* 175-byte string literal not displayed */
Item any `json:"item" title:"Item" description:"The per-item payload to reassemble."`
}
InMessage is one fanned-out item to buffer.
type OutMessage ¶
type OutMessage struct {
Context Context `json:"context,omitempty" title:"Context" description:"Context of the group's last arriving item."`
Items []any `json:"items" title:"Items" description:"All items of the group, ordered by index."`
}
OutMessage is the reassembled group.
Click to show internal directories.
Click to hide internal directories.