Documentation ¶
Index ¶
- func WithEndpoint(endpoint string) interfaces.BrokerOption
- func WithLogger(logger *logrus.Logger) interfaces.BrokerOption
- type Nats
- func (n *Nats) Close() error
- func (n *Nats) Connect() error
- func (n *Nats) Endpoint() string
- func (n *Nats) Publish(topic string, message interface{}) error
- func (n *Nats) Run() error
- func (n *Nats) Subscribe(topic string, handler interface{}) error
- func (n *Nats) Unsubscribe(topic string) error
- func (n *Nats) WithLogger(logger *logrus.Logger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithEndpoint ¶
func WithEndpoint(endpoint string) interfaces.BrokerOption
func WithLogger ¶
func WithLogger(logger *logrus.Logger) interfaces.BrokerOption
Types ¶
type Nats ¶
func New ¶
func New(options ...interfaces.BrokerOption) (*Nats, error)
func (*Nats) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.