Documentation ¶
Index ¶
- Constants
- func ErrConnect(err error) error
- func ErrEncodedConn(err error) error
- func ErrPublish(err error) error
- func ErrPublishRequest(err error) error
- func ErrQueueSubscribe(err error) error
- func New(opts Options) (broker.Handler, error)
- type Nats
- func (n *Nats) Info() string
- func (n *Nats) Publish(subject string, message *broker.Message) error
- func (n *Nats) PublishWithChannel(subject string, msgch chan *broker.Message) error
- func (n *Nats) Subscribe(subject, queue string, message []byte) error
- func (n *Nats) SubscribeWithChannel(subject, queue string, msgch chan *broker.Message) error
- type Options
Constants ¶
View Source
const ( ErrConnectCode = "11000" ErrEncodedConnCode = "11000" ErrPublishCode = "11001" ErrPublishRequestCode = "11001" ErrQueueSubscribeCode = "11001" )
Variables ¶
This section is empty.
Functions ¶
func ErrConnect ¶
func ErrEncodedConn ¶
func ErrPublish ¶
func ErrPublishRequest ¶
func ErrQueueSubscribe ¶
Types ¶
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
Nats will implement Nats subscribe and publish functionality
func (*Nats) PublishWithChannel ¶
PublishWithChannel - to publish messages with channel
Click to show internal directories.
Click to hide internal directories.