pub enum Event {
ClientConnected {
connection_id: u64,
node_id: NodeId,
permitted: Sender<bool>,
},
ConnectionClosed {
connection_id: u64,
},
GetRequestReceived {
connection_id: u64,
request_id: u64,
hash: Hash,
ranges: ChunkRangesSeq,
},
GetManyRequestReceived {
connection_id: u64,
request_id: u64,
hashes: Vec<Hash>,
ranges: ChunkRangesSeq,
},
PushRequestReceived {
connection_id: u64,
request_id: u64,
hash: Hash,
ranges: ChunkRangesSeq,
permitted: Sender<bool>,
},
TransferStarted {
connection_id: u64,
request_id: u64,
index: u64,
hash: Hash,
size: u64,
},
TransferProgress {
connection_id: u64,
request_id: u64,
index: u64,
end_offset: u64,
},
TransferCompleted {
connection_id: u64,
request_id: u64,
stats: Box<TransferStats>,
},
TransferAborted {
connection_id: u64,
request_id: u64,
stats: Option<Box<TransferStats>>,
},
}Expand description
Provider progress events, to keep track of what the provider is doing.
ClientConnected -> (GetRequestReceived -> (TransferStarted -> TransferProgress*n)*n -> (TransferCompleted | TransferAborted))*n -> ConnectionClosed
Variants§
ClientConnected
A new client connected to the provider.
ConnectionClosed
Connection closed.
GetRequestReceived
A new get request was received from the provider.
Fields
ranges: ChunkRangesSeqThe exact query ranges of the request.
GetManyRequestReceived
A new get request was received from the provider.
Fields
ranges: ChunkRangesSeqThe exact query ranges of the request.
PushRequestReceived
A new get request was received from the provider.
Fields
ranges: ChunkRangesSeqThe exact query ranges of the request.
TransferStarted
Transfer for the nth blob started.
Fields
TransferProgress
Progress of the transfer.
Fields
TransferCompleted
Entire transfer completed.
Fields
stats: Box<TransferStats>Statistics about the transfer.
TransferAborted
Entire transfer aborted