Documentation ¶
Index ¶
- func JoinTopic(topics ...string) string
- func SanitizeTopic(topic string) string
- type Connection
- func (conn *Connection) Disconnect() error
- func (conn *Connection) OnConnectionUp() <-chan struct{}
- func (conn *Connection) OnError() <-chan error
- func (conn *Connection) OnMessage() <-chan Data
- func (conn *Connection) OnServerDisconnect() <-chan struct{}
- func (conn *Connection) Publish(data Data)
- func (conn *Connection) Subscribe(topic string)
- type Data
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeTopic ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Disconnect ¶
func (conn *Connection) Disconnect() error
func (*Connection) OnConnectionUp ¶
func (conn *Connection) OnConnectionUp() <-chan struct{}
func (*Connection) OnError ¶
func (conn *Connection) OnError() <-chan error
func (*Connection) OnMessage ¶
func (conn *Connection) OnMessage() <-chan Data
func (*Connection) OnServerDisconnect ¶
func (conn *Connection) OnServerDisconnect() <-chan struct{}
func (*Connection) Publish ¶
func (conn *Connection) Publish(data Data)
func (*Connection) Subscribe ¶
func (conn *Connection) Subscribe(topic string)
Click to show internal directories.
Click to hide internal directories.