mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
2a6be9cb92
* Remove interfaces for replacement * Remove interfaces for replacement * Remove interfaces for replacement * Squashed 'interfaces/' content from commit f047f61c git-subtree-dir: interfaces git-subtree-split: f047f61c2a0388aeeef2750cab1045f7212acfcc * save
51 lines
1.2 KiB
Protocol Buffer
51 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "types/types.proto";
|
|
|
|
option go_package = "./downloader;downloader";
|
|
|
|
package downloader;
|
|
|
|
service Downloader {
|
|
rpc Download (DownloadRequest) returns (google.protobuf.Empty) {}
|
|
rpc Verify (VerifyRequest) returns (google.protobuf.Empty) {}
|
|
rpc Stats (StatsRequest) returns (StatsReply) {}
|
|
}
|
|
|
|
message DownloadItem {
|
|
string path = 1;
|
|
types.H160 torrent_hash = 2; // single hash will be resolved as magnet link
|
|
}
|
|
message DownloadRequest {
|
|
repeated DownloadItem items = 1; // single hash will be resolved as magnet link
|
|
}
|
|
|
|
message VerifyRequest {
|
|
}
|
|
|
|
|
|
message StatsRequest {
|
|
}
|
|
|
|
message StatsReply {
|
|
// First step on startup - "resolve metadata":
|
|
// - understand total amount of data to download
|
|
// - ensure all pieces hashes available
|
|
// - validate files after crush
|
|
// - when all metadata ready - can start download/upload
|
|
int32 metadataReady = 1;
|
|
int32 filesTotal = 2;
|
|
|
|
int32 peersUnique = 4;
|
|
uint64 connectionsTotal = 5;
|
|
|
|
bool completed = 6;
|
|
float progress = 7;
|
|
|
|
uint64 bytesCompleted = 8;
|
|
uint64 bytesTotal = 9;
|
|
uint64 uploadRate = 10; // bytes/sec
|
|
uint64 downloadRate = 11; // bytes/sec
|
|
}
|