Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Info contains the associated event info. Info interface{} // Sender is the object that generated the event. Sender interface{} }
Event defines a sonar event type.
type Sonar ¶
type Sonar struct {
// contains filtered or unexported fields
}
Sonar defines common publish/subscribe interface.
func (*Sonar) Post ¶
Post posts a given event to the sonar. All topic associated handlers will be executed in order based on the predefined priority value. Execution will be halted either if a handler returns an error or explicitly indicates it.
func (*Sonar) SubscribePriority ¶
SubscribePriority adds a new handler to a given topic providing an execution priority value. hnd priority may be any number (including negative). Handlers with a higher priority are executed first.
func (*Sonar) Unsubscribe ¶
Unsubscribe removes a topic registered handler.
Click to show internal directories.
Click to hide internal directories.