Documentation ¶
Index ¶
- Constants
- func HasListener(eventType string) bool
- func Post(eventType string, event interface{})
- func PublishEnabled() 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 (
EnvPublishAuditEventsKey = "FLOGO_PUBLISH_AUDIT_EVENTS"
)
Variables ¶
This section is empty.
Functions ¶
func HasListener ¶
func Post ¶
func Post(eventType string, event interface{})
Puts event with given type and data on the channel
func PublishEnabled ¶
func PublishEnabled() bool
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.