package
0.3.13-beta.0
Repository: https://github.com/spacemeshos/go-spacemesh.git
Documentation: pkg.go.dev

# Packages

Package mocks is a generated GoMock package.

# Functions

DefaultConfig is the default config for the fetch component.
NewFetch creates a new Fetch struct.
NewHashPeersCache creates a new hash-to-peers cache.
No description provided by the author
WithConfig configures the config for the fetcher.
WithContext configures the shutdown context for the fetcher.
WithLogger configures logger for the fetcher.

# Constants

No description provided by the author

# Structs

Config is the configuration file of the Fetch component.
No description provided by the author
Fetch is the main struct that contains network peers and logic to batch and dispatch hash fetch requests.
HashPeersCache holds lru cache of peers to pull hash from.
LayerData is the data response for a given layer ID.
LayerOpinion is the response for opinion for a given layer.
No description provided by the author
No description provided by the author
MeshHashRequest is used by ForkFinder to request the hashes of layers from a peer to find the layer at which a divergence occurred in the local mesh of the node.
RequestBatch is a batch of requests and a hash of all requests as ID.
RequestMessage is sent to the peer for hash query.
ResponseBatch is the response struct send for a RequestBatch.
ResponseMessage is sent to the node as a response.

# Interfaces

No description provided by the author
SyncValidator exists to allow for mocking of GossipHandlers through the use of ValidatorFunc.

# Type aliases

HashPeers holds registered peers for a hash.
Option is a type to configure a fetcher.
The ValidatorFunc type is an adapter to allow the use of functions as SyncValidators so that we can mock the behavior of GossipHandlers.