summaryrefslogtreecommitdiff
path: root/interfaces/events/handler.go
blob: 01f64d7324224d7cbc3beed04304620671d7cb99 (plain)
1
2
3
4
5
6
7
8
9
10
package events

type Handler interface {
	NumListeners() int
	AddListener(listener EventListener)
	Push(e interface{})
}

// Event listener listens for the events produced by worker, worker pool or other service.
type EventListener func(event interface{})