Documentation ¶
Index ¶
- type TrieDB
- func (db *TrieDB) Close() error
- func (db *TrieDB) GetClientStats(clientID string) (subscription.Stats, error)
- func (db *TrieDB) GetClientStatsLocked(clientID string) (subscription.Stats, error)
- func (db *TrieDB) GetStats() subscription.Stats
- func (db *TrieDB) GetStatusLocked() subscription.Stats
- func (db *TrieDB) Init(clientIDs []string) error
- func (db *TrieDB) Iterate(fn subscription.IterateFn, options subscription.IterationOptions)
- func (db *TrieDB) IterateLocked(fn subscription.IterateFn, options subscription.IterationOptions)
- func (db *TrieDB) Subscribe(clientID string, subscriptions ...*gmqtt.Subscription) (subscription.SubscribeResult, error)
- func (db *TrieDB) SubscribeLocked(clientID string, subscriptions ...*gmqtt.Subscription) subscription.SubscribeResult
- func (db *TrieDB) Unsubscribe(clientID string, topics ...string) error
- func (db *TrieDB) UnsubscribeAll(clientID string) error
- func (db *TrieDB) UnsubscribeAllLocked(clientID string)
- func (db *TrieDB) UnsubscribeLocked(clientID string, topics ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrieDB ¶
TrieDB implement the subscription.Interface, it use trie tree to store topics.
func (*TrieDB) GetClientStats ¶
func (db *TrieDB) GetClientStats(clientID string) (subscription.Stats, error)
func (*TrieDB) GetClientStatsLocked ¶
func (db *TrieDB) GetClientStatsLocked(clientID string) (subscription.Stats, error)
GetClientStatsLocked the non thread-safe version of GetClientStats
func (*TrieDB) GetStats ¶
func (db *TrieDB) GetStats() subscription.Stats
GetStats returns the statistic information of the store
func (*TrieDB) GetStatusLocked ¶
func (db *TrieDB) GetStatusLocked() subscription.Stats
GetStats is the non thread-safe version of GetStats
func (*TrieDB) Iterate ¶
func (db *TrieDB) Iterate(fn subscription.IterateFn, options subscription.IterationOptions)
func (*TrieDB) IterateLocked ¶
func (db *TrieDB) IterateLocked(fn subscription.IterateFn, options subscription.IterationOptions)
IterateLocked is the non thread-safe version of Iterate
func (*TrieDB) Subscribe ¶
func (db *TrieDB) Subscribe(clientID string, subscriptions ...*gmqtt.Subscription) (subscription.SubscribeResult, error)
SubscribeLocked add subscriptions for the client
func (*TrieDB) SubscribeLocked ¶
func (db *TrieDB) SubscribeLocked(clientID string, subscriptions ...*gmqtt.Subscription) subscription.SubscribeResult
SubscribeLocked is the non thread-safe version of Subscribe
func (*TrieDB) Unsubscribe ¶
Unsubscribe remove subscriptions for the client
func (*TrieDB) UnsubscribeAll ¶
UnsubscribeAll delete all subscriptions of the client
func (*TrieDB) UnsubscribeAllLocked ¶
UnsubscribeAllLocked is the non thread-safe version of UnsubscribeAll
func (*TrieDB) UnsubscribeLocked ¶
UnsubscribeLocked is the non thread-safe version of Unsubscribe