Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailbox ¶
type Mailbox struct {
// contains filtered or unexported fields
}
Mailbox contains a subscription to a NATS subject
type PO ¶
type PO struct {
// contains filtered or unexported fields
}
PO (short for PostOffice) is responsible for managing multple mailboxes
Each mailbox is represented by a subscription to a subject topic in a NATS.
func (*PO) AcquireMailbox ¶
func (p *PO) AcquireMailbox(name, group string, handler MailHandler) (*Mailbox, error)
AcquireMailbox opens a new subscription for the given name and optionally register it with the group information.
Using a group allows for the messages sent to name to be distributed by multiple nodes, as long as they belong to the same group.
Not providing a group name defaults to a pub/sub mode where all nodes subscribing to the given name will receive copies of the message.
Click to show internal directories.
Click to hide internal directories.