Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandler struct {
// contains filtered or unexported fields
}
MessageHandler - handles RPC messages
func NewMessageHandler ¶
func NewMessageHandler( sendCh chan<- interface{}, sto store.Store, pubSub *PubSub, webhook webhook.Caller, ) (*MessageHandler, error)
NewMessageHandler - construct a MessageHandler
func (*MessageHandler) HandleRawMessage ¶
func (c *MessageHandler) HandleRawMessage(data []byte) error
HandleRawMessage - handle a raw client message
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub - pub/sub interface for message senders
func (*PubSub) Publish ¶
Publish - publishes a message to all subscribers of an id and returns the number of subscribers messaged
func (*PubSub) Subscribe ¶
func (cm *PubSub) Subscribe(id string, subscriber Subscriber)
Subscribe - subscribes a Subscriber to an id
func (*PubSub) Unsubscribe ¶
func (cm *PubSub) Unsubscribe(id string, subscriber Subscriber)
Unsubscribe - unsubscribes a Subscriber from an id
func (*PubSub) UnsubscribeAll ¶
func (cm *PubSub) UnsubscribeAll(subscriber Subscriber) int
UnsubscribeAll - unsubscribes subscriber from every id and returns the number of unsubscriptions done
Click to show internal directories.
Click to hide internal directories.