Documentation
¶
Overview ¶
Package client is a client library for the msgbus server
Index ¶
Constants ¶
View Source
const ( // DefaultReconnectInterval ... DefaultReconnectInterval = 2 // DefaultMaxReconnectInterval ... DefaultMaxReconnectInterval = 64 // DefaultPingInterval is the default time interval (in seconds) between pings DefaultPingInterval = 60 )
Variables ¶
View Source
var ( // ErrConnectionFailed is an error returned when the connection fails ErrConnectionFailed = errors.New("error: connection failed") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a msgbus client
func (*Client) Subscribe ¶
func (c *Client) Subscribe(topic string, index int64, handler msgbus.HandlerFunc) *Subscriber
Subscribe ...
type Subscriber ¶
Subscriber ...
func NewSubscriber ¶
func NewSubscriber(client *Client, topic string, index int64, handler msgbus.HandlerFunc) *Subscriber
NewSubscriber ...
Click to show internal directories.
Click to hide internal directories.