Documentation ¶
Index ¶
- type Bus
- type Subscription
- type TinyBus
- func (b *TinyBus) Connected() bool
- func (b *TinyBus) Destroy()
- func (b *TinyBus) OnConnect(cb func())
- func (b *TinyBus) OnDisconnect(cb func())
- func (b *TinyBus) Publish(topic string, payload []byte)
- func (b *TinyBus) Subscribe(topic string, callback func(topic string, payload []byte)) (*Subscription, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus interface { Publish(topic string, payload []byte) Subscribe(topic string, callback func(topic string, payload []byte)) (*Subscription, error) OnDisconnect(cb func()) OnConnect(cb func()) Connected() bool Destroy() }
func MustConnect ¶
type Subscription ¶
type Subscription struct { Cancel func() // contains filtered or unexported fields }
type TinyBus ¶
type TinyBus struct {
// contains filtered or unexported fields
}
func ConnectTinyBus ¶
func (*TinyBus) OnDisconnect ¶
func (b *TinyBus) OnDisconnect(cb func())
Click to show internal directories.
Click to hide internal directories.