Documentation ¶
Index ¶
- type Event
- func (e *Event) Notify(eventtype EventType, value interface{}) (err error)
- func (e *Event) NotifyAll() (errs []error)
- func (e *Event) NotifySubscriber(eventfunc EventFunc, value interface{})
- func (e *Event) Subscribe(eventtype EventType, eventfunc EventFunc) Subscriber
- func (e *Event) UnSubscribe(eventtype EventType, subscriber Subscriber) (err error)
- type EventFunc
- type EventType
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) NotifySubscriber ¶
func (*Event) Subscribe ¶
func (e *Event) Subscribe(eventtype EventType, eventfunc EventFunc) Subscriber
adds a new subscriber to Event.
func (*Event) UnSubscribe ¶
func (e *Event) UnSubscribe(eventtype EventType, subscriber Subscriber) (err error)
UnSubscribe removes the specified subscriber
type Subscriber ¶
type Subscriber chan interface{}
Click to show internal directories.
Click to hide internal directories.