2021-07-22 17:13:18 +00:00
|
|
|
// Package events defines a gRPC events service implementation,
|
2021-08-19 18:00:57 +00:00
|
|
|
// following the official API standards https://ethereum.github.io/beacon-apis/#/.
|
2021-06-14 16:58:08 +00:00
|
|
|
// This package includes the events endpoint.
|
2021-07-02 15:54:52 +00:00
|
|
|
package events
|
2021-06-14 16:58:08 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
blockfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/block"
|
|
|
|
opfeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/operation"
|
|
|
|
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Server defines a server implementation of the gRPC events service,
|
|
|
|
// providing RPC endpoints to subscribe to events from the beacon node.
|
|
|
|
type Server struct {
|
|
|
|
Ctx context.Context
|
|
|
|
StateNotifier statefeed.Notifier
|
|
|
|
BlockNotifier blockfeed.Notifier
|
|
|
|
OperationNotifier opfeed.Notifier
|
|
|
|
}
|