package eventbus
Import Path
github.com/libp2p/go-libp2p/p2p/host/eventbus (on go.dev)
Dependency Relation
imports 12 packages, and imported by 8 packages
Package-Level Type Names (total 3)
MetricsTracer tracks metrics for the eventbus subsystem
AddSubscriber adds a subscriber for the event type
EventEmitted counts the total number of events grouped by event type
RemoveSubscriber removes a subscriber for the event type
SubscriberEventQueued counts the total number of events grouped by subscriber
SubscriberQueueFull tracks whether a subscribers channel if full
SubscriberQueueLength is the length of the subscribers channel
func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer
func WithMetricsTracer(metricsTracer MetricsTracer) Option
func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption
func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer
func WithMetricsTracer(metricsTracer MetricsTracer) Option
func NewBus(opts ...Option) event.Bus
Package-Level Functions (total 7)
func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer
Stateful is an Emitter option which makes the eventbus channel
'remember' last event sent, and when a new subscriber joins the
bus, the remembered event is immediately sent to the subscription
channel.
This allows to provide state tracking for dynamic systems, and/or
allows new subscribers to verify that there are Emitters on the channel
func WithMetricsTracer(metricsTracer MetricsTracer) Option![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |