mirror of
https://github.com/libp2p/go-eventbus.git
synced 2025-03-25 12:10:06 +08:00
Update Emitter docs
This commit is contained in:
parent
942c134291
commit
2f028f9607
@ -74,8 +74,8 @@ type Bus interface {
|
||||
// select output type
|
||||
//
|
||||
// Example:
|
||||
// emit, cancel, err := eventbus.Emitter(new(EventT))
|
||||
// defer cancel()
|
||||
// emit, err := eventbus.Emitter(new(EventT))
|
||||
// defer emit.Close() // MUST call this after being done with the emitter
|
||||
//
|
||||
// emit(EventT{})
|
||||
Emitter(eventType interface{}, opts ...EmitterOption) (EmitFunc, error)
|
||||
|
Loading…
Reference in New Issue
Block a user