Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) Connect() error
- func (c *Client) Debugf(format string, v ...interface{})
- func (c *Client) IsClosed() bool
- func (c *Client) Logf(format string, v ...interface{})
- func (c *Client) SendRequest(subj string, payload []byte, cb mq.Response)
- func (c *Client) SetClosedHandler(cb func(error))
- func (c *Client) Subscribe(namespace string, cb mq.Response) (mq.Unsubscriber, error)
- func (c *Client) Tracef(format string, v ...interface{})
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { RequestTimeout time.Duration URL string Creds string ClientCert string ClientKey string RootCAs []string Logger logger.Logger BufferSize int // contains filtered or unexported fields }
Client holds a client connection to a nats server.
func (*Client) SendRequest ¶
SendRequest sends a request to the MQ.
func (*Client) SetClosedHandler ¶
SetClosedHandler sets the handler when the connection is closed
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription implements the mq.Unsubscriber interface.
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe() error
Unsubscribe removes the subscription.
Click to show internal directories.
Click to hide internal directories.