Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStream ¶
type EventStream[View any, E Event[View]] interface { EventView[View, E] Updates() *pubsub.Topic[E] }
EventStream is a stream of events that can be published and subscribed to, that update a materialized view
func NewInMemory ¶
func NewInMemory[View any, E Event[View]](initial View) EventStream[View, E]
type EventView ¶ added in v0.414.0
type EventView[View any, E Event[View]] interface { View(ctx context.Context) (View, error) Publish(ctx context.Context, event E) error }
EventView is a materialized view of an event stream.
type StreamView ¶
type StreamView[View any] interface { View(ctx context.Context) (View, error) // Subscribe to the event stream. The channel will only receive events that are published after the subscription. Subscribe(ctx context.Context) <-chan Event[View] }
StreamView is a view of an event stream that can be subscribed to, without modifying the stream.
type VerboseMessage ¶
type VerboseMessage interface {
VerboseMessage()
}
Click to show internal directories.
Click to hide internal directories.