mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-29 06:37:17 +00:00
58a13a2eb7
* Fix spans in regular_sync * more regular sync ctx fixes * rename * use more imported interfaces * add godoc comments
23 lines
623 B
Go
23 lines
623 B
Go
package p2p
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogo/protobuf/proto"
|
|
"github.com/prysmaticlabs/prysm/shared/event"
|
|
)
|
|
|
|
// Broadcaster represents a subset of the p2p.Server. This interface is useful
|
|
// for testing or when the calling code only needs access to the broadcast
|
|
// method.
|
|
type Broadcaster interface {
|
|
Broadcast(context.Context, proto.Message)
|
|
}
|
|
|
|
// Subscriber represents a subset of the p2p.Server. This interface is useful
|
|
// for testing or when the calling code only needs access to the subscribe
|
|
// method.
|
|
type Subscriber interface {
|
|
Subscribe(msg proto.Message, channel chan Message) event.Subscription
|
|
}
|