Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithNumWorkers ¶
func WithNumWorkers(n int) func(d *Dispatcher)
WithNumWorkers allows providing a specific number of workers for a Dispatcher instance.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher handles a group of workers in charge of processing events that happen in the Hub.
func NewDispatcher ¶
func NewDispatcher(svc *Services, opts ...func(d *Dispatcher)) *Dispatcher
NewDispatcher creates a new Dispatcher instance.
type ManagerMock ¶
ManagerMock is a mock implementation of the EventManager interface.
func (*ManagerMock) GetPending ¶
GetPending implements the EventManager interface.
type Services ¶
type Services struct { DB hub.DB EventManager hub.EventManager SubscriptionManager hub.SubscriptionManager WebhookManager hub.WebhookManager NotificationManager hub.NotificationManager }
Services is a wrapper around several internal services used to handle events processing.
Click to show internal directories.
Click to hide internal directories.