Documentation ¶
Overview ¶
Package pubsub provide the implementation of a PubSub pattern with channels
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Consume ¶
func Consume[Input, Output any](ctx context.Context, input <-chan Input, output chan<- Output, transformer MessageTransformer[Input, Output], gate channel.MessageFilter[Output])
Types ¶
type MessageTransformer ¶
type PubSub ¶
type PubSub[Message any] interface { // Publish a message to a topic Publish(message Message) error // Subscribe to a topic Subscribe(filter channel.MessageFilter[Message]) (<-chan Message, error) // Unsubscribe from a topic Unsubscribe(<-chan Message) error }
func NewBlockingPubSub ¶
Click to show internal directories.
Click to hide internal directories.