Documentation ¶
Index ¶
- Constants
- func GetEventQueueSize() int
- func HasListener(eventType string) bool
- func Post(eventType string, event interface{})
- func PublishEventEnabled() bool
- func RegisterListener(name string, listener Listener, eventTypes []string) error
- func UnRegisterListener(name string, eventTypes []string)
- type Context
- type Emitter
- type Listener
Constants ¶
View Source
const ( EnvKeyEventQueueSize = "FLOGO_EVENT_QUEUE_SIZE" DefaultEventQueueSize = 100 EnvKeyPublishAuditEvents = "FLOGO_PUBLISH_AUDIT_EVENTS" DefaultPublishAuditEvents = true )
Variables ¶
This section is empty.
Functions ¶
func GetEventQueueSize ¶ added in v1.1.0
func GetEventQueueSize() int
GetEventQueues returns the number of queues to buffer events
func HasListener ¶
func Post ¶
func Post(eventType string, event interface{})
Puts event with given type and data on the channel
func PublishEventEnabled ¶ added in v1.1.0
func PublishEventEnabled() bool
PublishEventEnabled indicate the publish event enabled or not
func RegisterListener ¶
Registers listener for given event types
func UnRegisterListener ¶
Unregister event listener for given event types . To unregister from all event types, set eventTypes to nil
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is a wrapper over specific event
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
func (*Emitter) HasListeners ¶
func (*Emitter) RegisterListener ¶
func (*Emitter) UnRegisterListener ¶
Click to show internal directories.
Click to hide internal directories.