Documentation
¶
Overview ¶
Package event defines canonical descriptors for typed application events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventListenerHandler ¶
EventListenerHandler contributes one ordered typed event listener.
func EventTopicHandler ¶
EventTopicHandler contributes a typed event topic provider.
func Listener ¶
func Listener() sdk.Definition
Listener marks a provider-owned method as a typed event listener.
Spice matches the method payload to an exact topic payload type and orders listeners by order, module, and symbol identity. The generated invocation propagates context and errors without a global event bus.
// @import { Listener } from "github.com/spice-framework/spice/annotation/event"
// @Listener(order=10)
func Topic ¶
func Topic() sdk.Definition
Topic marks a provider function that declares one typed event topic.
The topic's exact payload type and ownership come from the Go signature and application module. Generated publishing remains explicit and observable.
// @import { Topic } from "github.com/spice-framework/spice/annotation/event"
// @Topic
func OrderChangedTopic() event.Topic[OrderChanged]
Types ¶
This section is empty.