Documentation ¶
Index ¶
Constants ¶
View Source
const ( MethodGet = "Get" MaxGetResponseTime = 5 * time.Second )
Constants related to the Get method.
View Source
const ( MethodGetPrefixes = "GetPrefixes" MaxGetPrefixesResponseTime = 5 * time.Second )
Constants related to the GetPrefixes method.
View Source
const ( MethodIterate = "Iterate" MaxIterateResponseTime = 5 * time.Second )
Constants related to the Iterate method.
View Source
const StoragePubProtocolID = "storagepub"
StoragePubProtocolID is a unique protocol identifier for the storage pub protocol.
Variables ¶
View Source
var StoragePubProtocolVersion = version.Version{Major: 1, Minor: 0, Patch: 0}
StoragePubProtocolVersion is the supported version of the storage pub protocol.
Functions ¶
Types ¶
type Client ¶
type Client interface { // Get fetches a single key and returns the corresponding proof. Get(ctx context.Context, request *GetRequest) (*ProofResponse, rpc.PeerFeedback, error) // GetPrefixes fetches all keys under the given prefixes and returns the corresponding proofs. GetPrefixes(ctx context.Context, request *GetPrefixesRequest) (*ProofResponse, rpc.PeerFeedback, error) // Iterate seeks to a given key and then fetches the specified number of following items based // on key iteration order. Iterate(ctx context.Context, request *IterateRequest) (*ProofResponse, rpc.PeerFeedback, error) }
Client is a storage pub protocol client.
type GetPrefixesRequest ¶
type GetPrefixesRequest = syncer.GetPrefixesRequest
GetPrefixesRequest is a GetPrefixes request.
type IterateRequest ¶
type IterateRequest = syncer.IterateRequest
IterateRequest is an Iterate request.
type ProofResponse ¶
type ProofResponse = syncer.ProofResponse
ProofResponse is a response to Get/GetPrefixes/Iterate containing a proof.
Click to show internal directories.
Click to hide internal directories.