Documentation ¶
Overview ¶
Package pubsub contains interfaces for publishing data to queues and subscribing and consuming data from those queues.
Index ¶
Constants ¶
View Source
const ( PublisherClosed = Error("publisher is closed") SubscriberCLosed = Error("subscriber is closed") )
Pubsub errors.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HandlerWithAck ¶
HandlerWithAck is the handler used to invoke the app handler.
type Message ¶
type Message []byte
Message is the message that is going to transit to the event pubsub.
type Subscriber ¶
type Subscriber interface { Subscribe(ctx context.Context, subscription string, handler Handler) error SubscribeWithAck(ctx context.Context, subscription string, handler HandlerWithAck) error }
Subscriber subscribe to a topic subscription and handle the incoming event published to the topic.
Click to show internal directories.
Click to hide internal directories.