Documentation ¶
Index ¶
- type Subscriptions
- func (b *Subscriptions) Create(_ context.Context, sub store.Subscription) (string, error)
- func (b *Subscriptions) Delete(_ context.Context, subID string) error
- func (b *Subscriptions) Get(_ context.Context, id string) (store.Subscription, error)
- func (b *Subscriptions) List(_ context.Context, trackerName string) ([]store.Subscription, error)
- func (b *Subscriptions) Update(_ context.Context, sub store.Subscription) error
- type Tickets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
Subscriptions implements engine.Subscriptions over the BoltDB storage. It contains three top-level buckets: subscriptions: key - subscriptionID, val - subscription tracker_refs_to_subs: k: tracker name, v: nested bucket with
k: subscriptionID, v: timestamp in RFC3339 nano
tracker_trigger_to_subs: k - reference in "trackerName:triggerName" form, v: subscriptionID
func NewSubscription ¶
func NewSubscription(fileName string, options bolt.Options, log logx.Logger) (*Subscriptions, error)
NewSubscription creates buckets and initial data processing
func (*Subscriptions) Create ¶
func (b *Subscriptions) Create(_ context.Context, sub store.Subscription) (string, error)
Create creates a subscription in the storage.
func (*Subscriptions) Delete ¶
func (b *Subscriptions) Delete(_ context.Context, subID string) error
Delete subscription by id.
func (*Subscriptions) Get ¶
func (b *Subscriptions) Get(_ context.Context, id string) (store.Subscription, error)
Get subscription by id.
func (*Subscriptions) List ¶
func (b *Subscriptions) List(_ context.Context, trackerName string) ([]store.Subscription, error)
List lists the subscriptions registered on the given tracker.
func (*Subscriptions) Update ¶
func (b *Subscriptions) Update(_ context.Context, sub store.Subscription) error
Update totally rewrites the provided subscription entry.
type Tickets ¶
type Tickets struct {
// contains filtered or unexported fields
}
Tickets implements engine.Tickets over BoltDB. tickets: key - ticketID, val - ticket refs: key - reference, val - ticketID
func NewTickets ¶
NewTickets creates buckets and initial data processing