Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶ added in v2.11.0
func NewContext(ctx context.Context, d *Dispatcher) context.Context
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func FromContext ¶ added in v2.11.0
func FromContext(ctx context.Context) (*Dispatcher, bool)
func NewDispatcher ¶
func NewDispatcher(opts ...Option) *Dispatcher
func (*Dispatcher) AddListener ¶
func (d *Dispatcher) AddListener(listeners ...Listener)
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(event Event)
func (*Dispatcher) DispatchAsync ¶ added in v2.10.0
func (d *Dispatcher) DispatchAsync(event Event)
func (*Dispatcher) Wait ¶ added in v2.11.0
func (d *Dispatcher) Wait()
type Option ¶
type Option func(*Dispatcher)
type Provider ¶ added in v2.11.0
type Provider struct {
*Dispatcher
}
func NewProvider ¶ added in v2.11.0
func NewProvider(dispatcher *Dispatcher) *Provider
Click to show internal directories.
Click to hide internal directories.