Documentation ¶
Overview ¶
Package node defines a gRPC node service implementation, providing useful endpoints for checking a node's sync status, peer info, genesis data, and version information.
Index ¶
- type Server
- func (ns *Server) GetETH1ConnectionStatus(_ context.Context, _ *empty.Empty) (*ethpb.ETH1ConnectionStatus, error)
- func (ns *Server) GetGenesis(ctx context.Context, _ *empty.Empty) (*ethpb.Genesis, error)
- func (ns *Server) GetHealth(ctx context.Context, request *ethpb.HealthRequest) (*empty.Empty, error)
- func (ns *Server) GetHost(_ context.Context, _ *empty.Empty) (*ethpb.HostData, error)
- func (ns *Server) GetPeer(_ context.Context, peerReq *ethpb.PeerRequest) (*ethpb.Peer, error)
- func (ns *Server) GetSyncStatus(_ context.Context, _ *empty.Empty) (*ethpb.SyncStatus, error)
- func (_ *Server) GetVersion(_ context.Context, _ *empty.Empty) (*ethpb.Version, error)
- func (ns *Server) ListImplementedServices(_ context.Context, _ *empty.Empty) (*ethpb.ImplementedServices, error)
- func (ns *Server) ListPeers(ctx context.Context, _ *empty.Empty) (*ethpb.Peers, error)
- func (ns *Server) StreamBeaconLogs(_ *empty.Empty, stream ethpb.Health_StreamBeaconLogsServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { LogsStreamer logs.Streamer StreamLogsBufferSize int SyncChecker sync.Checker Server *grpc.Server BeaconDB db.ReadOnlyDatabase PeersFetcher p2p.PeersProvider PeerManager p2p.PeerManager GenesisTimeFetcher blockchain.TimeFetcher GenesisFetcher blockchain.GenesisFetcher POWChainInfoFetcher execution.ChainInfoFetcher BeaconMonitoringHost string BeaconMonitoringPort int }
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, and services the node implements and runs.
func (*Server) GetETH1ConnectionStatus ¶
func (ns *Server) GetETH1ConnectionStatus(_ context.Context, _ *empty.Empty) (*ethpb.ETH1ConnectionStatus, error)
GetETH1ConnectionStatus gets data about the ETH1 endpoints.
func (*Server) GetGenesis ¶
GetGenesis fetches genesis chain information of Ethereum. Returns unix timestamp 0 if a genesis time has yet to be determined.
func (*Server) GetHealth ¶
func (ns *Server) GetHealth(ctx context.Context, request *ethpb.HealthRequest) (*empty.Empty, error)
GetHealth checks the health of the node
func (*Server) GetPeer ¶
GetPeer returns the data known about the peer defined by the provided peer id.
func (*Server) GetSyncStatus ¶
GetSyncStatus checks the current network sync status of the node.
func (*Server) GetVersion ¶
GetVersion checks the version information of the beacon node.
func (*Server) ListImplementedServices ¶
func (ns *Server) ListImplementedServices(_ context.Context, _ *empty.Empty) (*ethpb.ImplementedServices, error)
ListImplementedServices lists the services implemented and enabled by this node.
Any service not present in this list may return UNIMPLEMENTED or PERMISSION_DENIED. The server may also support fetching services by grpc reflection.
func (*Server) StreamBeaconLogs ¶
func (ns *Server) StreamBeaconLogs(_ *empty.Empty, stream ethpb.Health_StreamBeaconLogsServer) error
StreamBeaconLogs from the beacon node via a gRPC server-side stream. DEPRECATED: This endpoint doesn't appear to be used and have been marked for deprecation.