Documentation ¶
Index ¶
- Constants
- Variables
- 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) CloseConnection()
- func (n *Nats) ConnectedEndpoints() (endpoints []string)
- func (in *Nats) DeepCopy() *Nats
- func (in *Nats) DeepCopyInto(out broker.Handler)
- func (in *Nats) DeepCopyObject() broker.Handler
- func (n *Nats) Info() string
- func (in *Nats) IsEmpty() bool
- 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 = "11103" ErrEncodedConnCode = "11104" ErrPublishCode = "11105" ErrPublishRequestCode = "11101" ErrQueueSubscribeCode = "11102" )
Variables ¶
View Source
var (
NewEmptyConnection = &Nats{}
)
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) CloseConnection ¶ added in v0.5.2
func (n *Nats) CloseConnection()
func (*Nats) ConnectedEndpoints ¶ added in v0.5.18
func (*Nats) DeepCopy ¶ added in v0.2.17
DeepCopy is a deepcopy function, copying the receiver, creating a new Nats.
func (*Nats) DeepCopyInto ¶ added in v0.2.17
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Nats) DeepCopyObject ¶ added in v0.2.17
DeepCopyObject is a deepcopy function, copying the receiver, creating a new broker.Handler.
func (*Nats) PublishWithChannel ¶
PublishWithChannel - to publish messages with channel
Click to show internal directories.
Click to hide internal directories.