Documentation ¶
Index ¶
- type SubscriptionName
- type SubscriptionsStore
- func (s *SubscriptionsStore) Add(sub *subscription.Subscription)
- func (s *SubscriptionsStore) Count(channel string) int
- func (s *SubscriptionsStore) GetAll() []*subscription.Subscription
- func (s *SubscriptionsStore) Match(channel string) []*subscription.Subscription
- func (s *SubscriptionsStore) Remove(sub *subscription.Subscription)
- func (s *SubscriptionsStore) RemoveAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubscriptionName ¶
type SubscriptionName struct {
// contains filtered or unexported fields
}
func NewName ¶
func NewName(name string) *SubscriptionName
func (*SubscriptionName) Match ¶
func (n *SubscriptionName) Match(channel string) bool
type SubscriptionsStore ¶
type SubscriptionsStore struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(size int) *SubscriptionsStore
func (*SubscriptionsStore) Add ¶
func (s *SubscriptionsStore) Add(sub *subscription.Subscription)
func (*SubscriptionsStore) Count ¶
func (s *SubscriptionsStore) Count(channel string) int
Count return the number of subscriptions associated with the specified channel
func (*SubscriptionsStore) GetAll ¶
func (s *SubscriptionsStore) GetAll() []*subscription.Subscription
func (*SubscriptionsStore) Match ¶
func (s *SubscriptionsStore) Match(channel string) []*subscription.Subscription
Match returns the subscriptions that match with the specified channel name Wildcard subscriptions are matched
func (*SubscriptionsStore) Remove ¶
func (s *SubscriptionsStore) Remove(sub *subscription.Subscription)
func (*SubscriptionsStore) RemoveAll ¶
func (s *SubscriptionsStore) RemoveAll()
RemoveAll removel all subscriptions and close all channels
Click to show internal directories.
Click to hide internal directories.