Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNatsBroker ¶
Types ¶
type Broker ¶
type Broker interface {
Publish(ctx context.Context, subject string, data []byte) error
Subscribe(ctx context.Context, subject string, handler func(msg []byte) error) (*Subscription, error)
SubscribeAndReply(ctx context.Context, subject string, handler func(msg *Message)) (*Subscription, error)
Request(ctx context.Context, subject string, msg []byte) (*Message, error)
Drain() error
Close()
}
type Subscription ¶
type Subscription = nats.Subscription
Click to show internal directories.
Click to hide internal directories.