Discover Packages
github.com/usnistgov/ndn-dpdk
core
events
package
Version:
v0.0.0-...-1e60831
Opens a new window with list of versions in this module.
Published: Apr 23, 2024
License: NIST-PD-fallback
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package events provides a simple event emitter.
Emitter is a simple event emitter.
This is a thin wrapper of emission.Emitter that modifies emitter.On method to return a function that cancels the callback registration.
NewEmitter creates a simple event emitter.
func (emitter *Emitter ) On(event, listener any ) (cancel func())
On registers a callback when an event occurs.
Returns a function that cancels the callback registration.
func (emitter *Emitter ) Once(event, listener any ) (cancel func())
Once registers a one-time callback when an event occurs.
Returns a function that cancels the callback registration.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.