Documentation
¶
Index ¶
Constants ¶
View Source
const EventHeaderName = "frame._internal.event.header"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventI ¶
type EventI interface {
// Name represents the unique human readable id of the event that is used to pick it from the registry
// or route follow up processing for system to processFunc using this particular event
Name() string
// PayloadType determines the type of payload the event uses. This is useful for decoding queue data.
PayloadType() any
// Validate enables automatic validation of payload supplied to the event without handling it in the execute block
Validate(ctx context.Context, payload any) error
// Execute performs all the logic required to action a step in the sequence of events required to achieve the end goal.
Execute(ctx context.Context, payload any) error
}
EventI an interface to represent a system event. All logic of an event is handled in the execute task and can also emit other events into the system or if they don't emit an event the processFunc is deemed complete.
Click to show internal directories.
Click to hide internal directories.