erigon-pulse/interfaces/downloader/downloader.proto
Alex Sharov bb6dfef7c8
add downloader.proto (#206)
* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit be07fc9

git-subtree-dir: interfaces
git-subtree-split: be07fc99183a7cef1ca08961033bdb917d85d9b5

* save

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit be07fc9

git-subtree-dir: interfaces
git-subtree-split: be07fc99183a7cef1ca08961033bdb917d85d9b5

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit 23d68fd

git-subtree-dir: interfaces
git-subtree-split: 23d68fda86c3a2c322e7b430c817b06b6f6ca311

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit 500dde8

git-subtree-dir: interfaces
git-subtree-split: 500dde8293c0a12d19d94b5ff633722a03d7fc4e

* save

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit e5b1945

git-subtree-dir: interfaces
git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184

* save

* Remove interfaces for replacement

* Squashed 'interfaces/' content from commit f36d878

git-subtree-dir: interfaces
git-subtree-split: f36d878080fe018a41fb903f81fc8f8ac9981cbd

* save

* save

* save
2021-12-14 13:33:32 +00:00

35 lines
721 B
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 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 StatsRequest {
}
message StatsReply {
bool completed = 1;
int32 progress = 2;
int32 peers = 3;
int32 torrents = 4;
uint64 bytesCompleted = 5;
uint64 bytesTotal = 6;
}