Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllDataGetter ¶
type ExtendedPeerstore ¶
type ExtendedPeerstore interface { TeedDatastore Datastore() ds.Batching peerstore.Peerstore StatusBook MetadataBook ENRBook AllDataGetter }
type IdentifyBook ¶
type IdentifyBook interface { ProtocolVersion(ctx context.Context, id peer.ID) (string, error) UserAgent(ctx context.Context, id peer.ID) (string, error) }
IdentifyBook exposes the peer libp2p-identify info. Libp2p stores this data in the misc-data book
type MetadataBook ¶
type MetadataBook interface { Metadata(context.Context, peer.ID) (*common.MetaData, error) ClaimedSeq(context.Context, peer.ID) (seq common.SeqNr, err error) RegisterSeqClaim(ctx context.Context, id peer.ID, seq common.SeqNr) (newer bool, err error) RegisterMetaFetch(context.Context, peer.ID) (uint64, error) RegisterMetadata(ctx context.Context, id peer.ID, md common.MetaData) (newer bool, err error) }
type PeerAllData ¶
type PeerAllData struct { PeerID peer.ID `json:"peer_id"` NodeID enode.ID `json:"node_id"` Pubkey string `json:"pubkey"` Addrs []string `json:"addrs,omitempty"` Protocols []string `json:"protocols,omitempty"` Latency time.Duration `json:"latency,omitempty"` UserAgent string `json:"user_agent,omitempty"` ProtocolVersion string `json:"protocol_version,omitempty"` ForkDigest *common.ForkDigest `json:"enr_fork_digest,omitempty"` NextForkVersion *common.Version `json:"enr_next_fork_version,omitempty"` NextForkEpoch *common.Epoch `json:"enr_next_fork_epoch,omitempty"` Attnets *common.AttnetBits `json:"enr_attnets,omitempty"` // Metadata with highest sequence number MetaData *common.MetaData `json:"metadata,omitempty"` // Highest claimed seq nr, we may not have the actual corresponding metadata yet. ClaimedSeq common.SeqNr `json:"claimed_seq,omitempty"` // Latest status Status *common.Status `json:"status,omitempty"` // Latest ENR ENR *enode.Node `json:"enr,omitempty"` }
func (*PeerAllData) String ¶
func (p *PeerAllData) String() string
type StatusBook ¶
type TeedDatastore ¶
type TeedDatastore interface { // AddTee registers a tee, and returns true if it was already registered AddTee(tee dstee.Tee) (exists bool) // RmTee registers a tee, and returns true if it was registered before unregistering it RmTee(tee dstee.Tee) (exists bool) // ListTees lists all the tees ListTees() (out []dstee.Tee) }
Click to show internal directories.
Click to hide internal directories.