Documentation ¶
Overview ¶
Package events provides event subscription and polling functionality.
Index ¶
Constants ¶
View Source
const ( Ping = 1 << iota Starting StartupComplete NodeDiscovered NodeConnected NodeDisconnected LocalIndexUpdated RemoteIndexUpdated ItemStarted ItemCompleted StateChanged AllEvents = ^EventType(0) )
View Source
const BufferSize = 64
Variables ¶
View Source
var ( ErrTimeout = errors.New("timeout") ErrClosed = errors.New("closed") )
View Source
var Default = NewLogger()
Functions ¶
This section is empty.
Types ¶
type BufferedSubscription ¶
type BufferedSubscription struct {
// contains filtered or unexported fields
}
func NewBufferedSubscription ¶
func NewBufferedSubscription(s *Subscription, size int) *BufferedSubscription
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) Subscribe ¶
func (l *Logger) Subscribe(mask EventType) *Subscription
func (*Logger) Unsubscribe ¶
func (l *Logger) Unsubscribe(s *Subscription)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.