go-libp2p-core/event/bus.go

35 lines
1.4 KiB
Go
Raw Normal View History

package event
import (
2022-08-18 23:54:48 +08:00
"github.com/libp2p/go-libp2p/core/event"
)
// SubscriptionOpt represents a subscriber option. Use the options exposed by the implementation of choice.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.SubscriptionOpt instead
type SubscriptionOpt = event.SubscriptionOpt
// EmitterOpt represents an emitter option. Use the options exposed by the implementation of choice.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.EmitterOpt instead
type EmitterOpt = event.EmitterOpt
// CancelFunc closes a subscriber.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.CancelFunc instead
type CancelFunc = event.CancelFunc
// WildcardSubscription is the type to subscribe to to receive all events
// emitted in the eventbus.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.WildcardSubscription instead
var WildcardSubscription = event.WildcardSubscription
// Emitter represents an actor that emits events onto the eventbus.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.Emitter instead
type Emitter = event.Emitter
2019-06-22 00:46:11 +08:00
// Subscription represents a subscription to one or multiple event types.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.Subscription instead
type Subscription = event.Subscription
2019-06-22 00:46:11 +08:00
// Bus is an interface for a type-based event delivery system.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/event.Bus instead
type Bus = event.Bus