Documentation
¶
Index ¶
- type Broker
- type ConcreteNatsBroker
- func (n *ConcreteNatsBroker) Close()
- func (n *ConcreteNatsBroker) Drain() error
- func (n *ConcreteNatsBroker) Publish(ctx context.Context, subject string, data []byte) error
- func (b *ConcreteNatsBroker) Request(ctx context.Context, subject string, msg []byte) (*Message, error)
- func (n *ConcreteNatsBroker) Subscribe(ctx context.Context, subject string, handler func(msg *Message)) (*Subscription, error)
- type Message
- type MuxBroker
- type Options
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcreteNatsBroker ¶
type ConcreteNatsBroker struct {
// contains filtered or unexported fields
}
func NewNatsBroker ¶
func NewNatsBroker(opts *Options) (*ConcreteNatsBroker, error)
func (*ConcreteNatsBroker) Close ¶
func (n *ConcreteNatsBroker) Close()
func (*ConcreteNatsBroker) Drain ¶
func (n *ConcreteNatsBroker) Drain() error
func (*ConcreteNatsBroker) Subscribe ¶
func (n *ConcreteNatsBroker) Subscribe(ctx context.Context, subject string, handler func(msg *Message)) (*Subscription, error)
type MuxBroker ¶
type MuxBroker struct {
// contains filtered or unexported fields
}
func NewServeMux ¶
func (*MuxBroker) HandleFunc ¶
type Subscription ¶
type Subscription = nats.Subscription
Click to show internal directories.
Click to hide internal directories.