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 { Publish(ctx context.Context, event E) error View() View 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 StreamView ¶
type StreamView[View any] interface { View() View // 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.