node

package
v4.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrRequest

type AddrRequest struct {
	Addr string `json:"addr"`
}

type Peer

type Peer struct {
	PeerID             string `json:"peer_id"`
	Enr                string `json:"enr"`
	LastSeenP2PAddress string `json:"last_seen_p2p_address"`
	State              string `json:"state"`
	Direction          string `json:"direction"`
}

type PeersResponse

type PeersResponse struct {
	Peers []*Peer `json:"Peers"`
}

type Server

type Server struct {
	SyncChecker               sync.Checker
	OptimisticModeFetcher     blockchain.OptimisticModeFetcher
	BeaconDB                  db.ReadOnlyDatabase
	PeersFetcher              p2p.PeersProvider
	PeerManager               p2p.PeerManager
	MetadataProvider          p2p.MetadataProvider
	GenesisTimeFetcher        blockchain.TimeFetcher
	HeadFetcher               blockchain.HeadFetcher
	ExecutionChainInfoFetcher execution.ChainInfoFetcher
}

func (*Server) AddTrustedPeer

func (s *Server) AddTrustedPeer(w http.ResponseWriter, r *http.Request)

AddTrustedPeer adds a new peer into node's trusted peer set by Multiaddr

func (*Server) ListTrustedPeer

func (s *Server) ListTrustedPeer(w http.ResponseWriter, r *http.Request)

ListTrustedPeer retrieves data about the node's trusted peers.

func (*Server) RemoveTrustedPeer

func (s *Server) RemoveTrustedPeer(w http.ResponseWriter, r *http.Request)

RemoveTrustedPeer removes peer from our trusted peer set but does not close connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL