Documentation
¶
Index ¶
- type Config
- type PubSub
- func (p *PubSub) Close() error
- func (p *PubSub) Publish(topic string, messages ...*message.Message) error
- func (p *PubSub) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)
- func (p *PubSub) SubscribeWithOpts(ctx context.Context, topic string, opts ...spi.Option) (<-chan *message.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSub ¶
PubSub implements a publisher/subscriber that connects to an AMQP-compatible message queue.
func (*PubSub) Subscribe ¶
Subscribe subscribes to a topic and returns the Go channel over which messages are sent. The returned channel will be closed when Close() is called on this struct.
func (*PubSub) SubscribeWithOpts ¶
func (p *PubSub) SubscribeWithOpts(ctx context.Context, topic string, opts ...spi.Option) (<-chan *message.Message, error)
SubscribeWithOpts subscribes to a topic using the given options, and returns the Go channel over which messages are sent. The returned channel will be closed when Close() is called on this struct.
Click to show internal directories.
Click to hide internal directories.