Documentation ¶
Index ¶
- Constants
- Variables
- type Event
- type EventHandler
- type EventSystem
- func (es *EventSystem) Emit(status, source string, obj interface{}, args ...interface{})
- func (es *EventSystem) RegisterHandler(status string, h EventHandler)
- func (es *EventSystem) RegisterHandlerFunc(status string, h func(Event) error)
- func (es *EventSystem) Run(quit <-chan struct{}, wg *sync.WaitGroup)
- type HandlerFunc
Constants ¶
View Source
const ( AllEvents = "all-events" NodeCleaning = "node-cleaning" NodeCreated = "node-created" NodePurged = "node-purged" NodeRunning = "node-running" PodCreated = "pod-created" PodEjected = "pod-ejected" // We found a lost node with a bound pod PodRunning = "pod-running" PodShouldDelete = "pod-should-delete" PodTerminated = "pod-terminated" PodUpdated = "pod-updated" SecretCreated = "secret-created" SecretDeleted = "secret-deleted" SecretUpdated = "secret-updated" ServiceCreated = "service-created" ServiceDeleted = "service-deleted" ServiceUpdated = "service-updated" StartSpotFailed = "start-spot-failed" UsageCreated = "usage-created" )
Variables ¶
View Source
var ArbitraryChanSize = 10000
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventSystem ¶
func NewEventSystem ¶
func NewEventSystem(quit <-chan struct{}, wg *sync.WaitGroup) *EventSystem
func (*EventSystem) Emit ¶
func (es *EventSystem) Emit(status, source string, obj interface{}, args ...interface{})
func (*EventSystem) RegisterHandler ¶
func (es *EventSystem) RegisterHandler(status string, h EventHandler)
At this time, you can't unregister from an event Why? Because we don't need that functionality yet If you need that functionality, feel free to add it
func (*EventSystem) RegisterHandlerFunc ¶
func (es *EventSystem) RegisterHandlerFunc(status string, h func(Event) error)
func (*EventSystem) Run ¶
func (es *EventSystem) Run(quit <-chan struct{}, wg *sync.WaitGroup)
type HandlerFunc ¶
Copy net/http's ability to register any function as a handler for an event
func (HandlerFunc) Handle ¶
func (f HandlerFunc) Handle(e Event) error
Click to show internal directories.
Click to hide internal directories.