Versions in this module Expand all Collapse all v0 v0.13.8 Nov 15, 2024 Changes in this version + var ErrRequestFailed = errors.New("request failed") + func NewPeerTracker() *peerTracker + type Network interface + AddHandler func(protocol uint64, handler p2p.Handler) error + NewClient func(protocol uint64, options ...p2p.ClientOption) *p2p.Client + SendAppRequest func(ctx context.Context, nodeID ids.NodeID, message []byte, ...) error + SendAppRequestAny func(ctx context.Context, minVersion *version.Application, message []byte, ...) (ids.NodeID, error) + SetGossipHandler func(handler message.GossipHandler) + SetRequestHandler func(handler message.RequestHandler) + Shutdown func() + Size func() uint32 + TrackBandwidth func(nodeID ids.NodeID, bandwidth float64) + func NewNetwork(p2pNetwork *p2p.Network, appSender common.AppSender, codec codec.Manager, ...) Network + type NetworkClient interface + SendAppRequest func(ctx context.Context, nodeID ids.NodeID, request []byte) ([]byte, error) + SendAppRequestAny func(ctx context.Context, minVersion *version.Application, request []byte) ([]byte, ids.NodeID, error) + TrackBandwidth func(nodeID ids.NodeID, bandwidth float64) + func NewNetworkClient(network Network) NetworkClient