Documentation
¶
Index ¶
- type Actor
- type SubscriptionsManager
- func (m *SubscriptionsManager) Create(ctx context.Context, tracker, trigger string) (store.Subscription, error)
- func (m *SubscriptionsManager) Delete(ctx context.Context, subscriptionID string) error
- func (m *SubscriptionsManager) List(ctx context.Context, tracker string) ([]store.Subscription, error)
- func (m *SubscriptionsManager) Listen(ctx context.Context, handler http.Handler) error
- func (m *SubscriptionsManager) SetTrackerRef(ctx context.Context, subscriptionID, trackerRef string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct {
Trackers map[string]tracker.Interface
TicketsStore engine.Tickets
Flow engine.Flow
Log logx.Logger
UpdateTimeout time.Duration
SubscriptionsManager *SubscriptionsManager
}
Actor receives updates from the Tracker and follows the calls the actions in the wrapped tracker according to the job provided by the Flow.
func (*Actor) HandleWebhook ¶
func (s *Actor) HandleWebhook(w http.ResponseWriter, r *http.Request)
HandleWebhook handles all webhooks to trackers
type SubscriptionsManager ¶
type SubscriptionsManager struct {
BaseURL string // must be without trailing slash
Router *mux.Router
Logger logx.Logger
Addr string
Store engine.Subscriptions
}
SubscriptionsManager manages subscriptions for task updates in trackers, including creation of subscriptions and recognizing particular subscription.
func (*SubscriptionsManager) Create ¶
func (m *SubscriptionsManager) Create(ctx context.Context, tracker, trigger string) (store.Subscription, error)
Create registers a new subscription for a specific trigger.
func (*SubscriptionsManager) Delete ¶
func (m *SubscriptionsManager) Delete(ctx context.Context, subscriptionID string) error
Delete proxies the call to the Store.
func (*SubscriptionsManager) List ¶
func (m *SubscriptionsManager) List(ctx context.Context, tracker string) ([]store.Subscription, error)
List proxies the call to the wrapped Store.
func (*SubscriptionsManager) SetTrackerRef ¶
func (m *SubscriptionsManager) SetTrackerRef(ctx context.Context, subscriptionID, trackerRef string) error
SetTrackerRef updates the subscription by setting the remote tracker ID to the desired subscription.
Click to show internal directories.
Click to hide internal directories.