Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSubscription ¶
func NewSubscription(logic EventHandlerFunc, interests ...EventType) *subscription
Types ¶
type EventDispatch ¶
type EventDispatch interface {
Send(event Event)
}
type EventHandlerFunc ¶
type EventHandlerFunc func(eventC <-chan Event, exitC chan struct{})
type EventType ¶
type EventType string
const ( All EventType = "all events" MonitorAlerted EventType = "monitor alerted" MonitorAlertStatusChanged EventType = "monitor alert status changed" MonitorExitingAlert EventType = "monitor exiting alert" MonitorNewEvent EventType = "new monitor event" MonitorEventUploaded EventType = "new event uploaded" MonitorEventRecorded EventType = "event saved in recordkeeper" )
type SubscriptionManager ¶
type SubscriptionManager interface { Register(handler EventHandlerFunc, eventInterests ...EventType) EventDispatch }
func NewDispatch ¶
func NewDispatch(manager *service.Manager) SubscriptionManager
Click to show internal directories.
Click to hide internal directories.