mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
2d75b12791
* initial implementation * register metadata provider * final implementation * tests * fixed imports * gazelle * code review * small cleanup * change errors.Wrap to status.Errorf * gazelle + goimports Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
28 lines
995 B
Go
28 lines
995 B
Go
// Package nodev1 defines a gRPC node service implementation, providing
|
|
// useful endpoints for checking a node's sync status, peer info,
|
|
// genesis data, and version information.
|
|
package nodev1
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/sync"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
// Server defines a server implementation of the gRPC Node service,
|
|
// providing RPC endpoints for verifying a beacon node's sync status, genesis and
|
|
// version information.
|
|
type Server struct {
|
|
SyncChecker sync.Checker
|
|
Server *grpc.Server
|
|
BeaconDB db.ReadOnlyDatabase
|
|
PeersFetcher p2p.PeersProvider
|
|
PeerManager p2p.PeerManager
|
|
MetadataProvider p2p.MetadataProvider
|
|
GenesisTimeFetcher blockchain.TimeFetcher
|
|
GenesisFetcher blockchain.GenesisFetcher
|
|
HeadFetcher blockchain.HeadFetcher
|
|
}
|