Documentation
¶
Index ¶
- type NATS
- func (c *NATS) Publish(_ context.Context, channel string, um extensions.BrokerMessage) error
- func (c *NATS) SetLogger(logger extensions.Logger)
- func (c *NATS) SetQueueName(name string)
- func (c *NATS) Subscribe(ctx context.Context, channel string) (msgs chan extensions.BrokerMessage, stop chan interface{}, err 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 the NATS implementation for asyncapi-codegen
func (*NATS) Publish ¶
func (c *NATS) Publish(_ context.Context, channel string, um extensions.BrokerMessage) error
Publish a message to the broker
func (*NATS) SetLogger ¶
func (c *NATS) SetLogger(logger extensions.Logger)
SetLogger set a custom logger that will log operations on broker controller
func (*NATS) SetQueueName ¶
SetQueueName sets a custom queue name for channel subscription
It can be used for multiple applications listening one the same channel but wants to listen on different queues.
func (*NATS) Subscribe ¶
func (c *NATS) Subscribe(ctx context.Context, channel string) (msgs chan extensions.BrokerMessage, stop chan interface{}, err error)
Subscribe to messages from the broker
Click to show internal directories.
Click to hide internal directories.