2019-06-20 22:59:53 +08:00
|
|
|
package event
|
|
|
|
|
2020-05-21 01:52:50 +08:00
|
|
|
import (
|
2022-08-18 23:54:48 +08:00
|
|
|
"github.com/libp2p/go-libp2p/core/event"
|
2020-05-21 01:52:50 +08:00
|
|
|
)
|
2019-06-20 22:59:53 +08:00
|
|
|
|
|
|
|
// 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
|
2019-06-20 22:59:53 +08:00
|
|
|
|
|
|
|
// 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
|
2019-06-20 22:59:53 +08:00
|
|
|
|
|
|
|
// 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
|
2020-05-21 01:52:50 +08:00
|
|
|
|
|
|
|
// 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
|
2020-05-21 01:52:50 +08:00
|
|
|
|
2019-06-20 22:59:53 +08:00
|
|
|
// 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-20 22:59:53 +08:00
|
|
|
|
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
|
|
|
|
2019-06-20 22:59:53 +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
|