nats

package
v0.0.0-...-315b7b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

type Nats struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

func New

func New(options ...interfaces.BrokerOption) (*Nats, error)

func (*Nats) Close

func (n *Nats) Close() error

func (*Nats) Connect

func (n *Nats) Connect() error

func (*Nats) Endpoint

func (n *Nats) Endpoint() string

func (*Nats) Publish

func (n *Nats) Publish(topic string, message interface{}) error

func (*Nats) Run

func (n *Nats) Run() error

func (*Nats) Subscribe

func (n *Nats) Subscribe(topic string, handler interface{}) error

func (*Nats) Unsubscribe

func (n *Nats) Unsubscribe(topic string) error

func (*Nats) WithLogger

func (n *Nats) WithLogger(logger *logrus.Logger) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL