Documentation ¶
Index ¶
- type Nats
- func (n *Nats) AsyncSubscribe(ctx context.Context, topic, consumer string, handler providers.MessageHandler) error
- func (n *Nats) Publish(ctx context.Context, topic string, message map[string]any) error
- func (n *Nats) Subscribe(ctx context.Context, topic, consumer string, handler providers.MessageHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
Nats is a struct for a nats stream provider
func (*Nats) AsyncSubscribe ¶
func (n *Nats) AsyncSubscribe(ctx context.Context, topic, consumer string, handler providers.MessageHandler) error
AsyncSubscribe subscribes to a topic and calls the handler in a goroutine
Click to show internal directories.
Click to hide internal directories.