Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct { Root *Leaf // a leaf containing a message and more leaves. // contains filtered or unexported fields }
Index is a prefix/trie tree containing topic subscribers and retained messages.
func (*Index) Subscribe ¶
Subscribe creates a subscription filter for a client. Returns true if the subscription was new.
func (*Index) Unsubscribe ¶
Unsubscribe removes a subscription filter for a client. Returns true if an unsubscribe action successful and the subscription existed.
type Leaf ¶
type Leaf struct { Key string // the key that was used to create the leaf. Parent *Leaf // a pointer to the parent node for the leaf. Leaves map[string]*Leaf // a map of child nodes, keyed on particle id. Filter string // the path of the topic filter being matched. Count int }
Leaf is a child node on the tree.
type Subscriptions ¶
Subscriptions is a map of subscriptions keyed on client.
Click to show internal directories.
Click to hide internal directories.