Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("subscription not found")
)
Functions ¶
This section is empty.
Types ¶
type Added ¶
type Added struct {
Subscription model.Subscription
}
Added represents an event when a subscription is added to the store.
type Removed ¶
type Removed struct {
Subscription model.Subscription
}
Removed represents an event when a subscription is removed from the store.
type Store ¶
type Store interface { // All returns all subscriptions for the specified topic. All(topic string) ([]model.Subscription, error) // For returns the subscriptions for the specified callback For(callback string) ([]model.Subscription, error) // Add saves/adds a subscription to the store. Add(sub model.Subscription) error // Get retrieves a subscription given a topic and callback. Get(topic, callback string) (*model.Subscription, error) // Remove removes a subscription from the store. Remove(sub model.Subscription) error }
Store defines an interface for stores to implement for data storage.
Click to show internal directories.
Click to hide internal directories.