Documentation ¶
Index ¶
- Variables
- type Client
- func (t *Client) AcquireConnection() *Connection
- func (sr *Client) Deliver(m *readMessage)
- func (sr *Client) NewSubscription(sub string) *Subscription
- func (t *Client) Ping() bool
- func (t *Client) Publish(s string, m []byte) bool
- func (t *Client) PublishAndConfirm(s string, m []byte) bool
- func (t *Client) Request(s string, m []byte, f func(*Subscription)) bool
- func (sr *Client) Resubscribe(c *Connection)
- func (t *Client) Run(d Dialer, h Handshaker) error
- func (t *Client) RunWithDefaults(addr string, user, pass string) error
- func (sr *Client) Subscribe(s *Subscription)
- func (sr *Client) Unsubscribe(s *Subscription)
- func (t *Client) Write(o writeObject) bool
- type Connection
- type Dialer
- type DumbChannelDialer
- type DumbDialer
- type Handshake
- type Handshaker
- type RetryingDialer
- type Stopper
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthenticationFailure = errors.New("nats: authentication failed") ErrHandshakeTimeout = errors.New("nats: handshake timed out") )
View Source
var ( ErrLineTooLong = errors.New("reader: line too long") ErrUnknownObject = errors.New("reader: unknown object") ErrInvalidObject = errors.New("reader: invalid object") )
View Source
var EmptyHandshake = emptyHandshake{}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Stopper // contains filtered or unexported fields }
func (*Client) AcquireConnection ¶
func (t *Client) AcquireConnection() *Connection
func (*Client) NewSubscription ¶
func (sr *Client) NewSubscription(sub string) *Subscription
func (*Client) Resubscribe ¶
func (sr *Client) Resubscribe(c *Connection)
func (*Client) RunWithDefaults ¶
func (*Client) Subscribe ¶
func (sr *Client) Subscribe(s *Subscription)
func (*Client) Unsubscribe ¶
func (sr *Client) Unsubscribe(s *Subscription)
type Connection ¶
type Connection struct { Stopper // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(rw io.ReadWriteCloser) *Connection
func (*Connection) Ping ¶
func (c *Connection) Ping() bool
func (*Connection) Run ¶
func (c *Connection) Run() error
func (*Connection) Write ¶
func (c *Connection) Write(o writeObject) bool
func (*Connection) WriteAndPing ¶
func (c *Connection) WriteAndPing(o writeObject) bool
func (*Connection) WriteChannel ¶
func (c *Connection) WriteChannel(oc chan writeObject) bool
type Dialer ¶
func DefaultDialer ¶
type DumbChannelDialer ¶
type DumbChannelDialer struct {
// contains filtered or unexported fields
}
type DumbDialer ¶
type Handshaker ¶
func DefaultHandshaker ¶
func DefaultHandshaker(username, password string) Handshaker
type RetryingDialer ¶
type Subscription ¶
type Subscription struct { Inbox chan *readMessage // contains filtered or unexported fields }
func (*Subscription) SetMaximum ¶
func (s *Subscription) SetMaximum(v uint)
func (*Subscription) SetQueue ¶
func (s *Subscription) SetQueue(v string)
func (*Subscription) SetSubject ¶
func (s *Subscription) SetSubject(v string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.