Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MaxEventNum is the initial default size of an event queue. // Use GetDefaultEventNum() to read the runtime default, // which can be changed via SetDefaultEventNum(). MaxEventNum = 200 )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultEventNum ¶ added in v0.16.2
func GetDefaultEventNum() int
GetDefaultEventNum returns the default event number for Queue
concurrent safe.
func SetDefaultEventNum ¶ added in v0.16.2
func SetDefaultEventNum(num int)
SetDefaultEventNum sets the default event number for Queue to num. It only affects queues created after the call; existing queues are not resized. It is not exposed as client/server option because the queue is used for internal debugging workflows, and users do not need to be aware of it.
num must be > 0; non-positive values are ignored and the default remains unchanged. concurrent safe.
Types ¶
type Bus ¶
type Bus interface {
Watch(event string, callback Callback)
Unwatch(event string, callback Callback)
Dispatch(event *Event)
DispatchAndWait(event *Event)
}
Bus implements the observer pattern to allow event dispatching and watching.
Click to show internal directories.
Click to hide internal directories.