Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add method SyncHost to service DfdaemonUpload #431

Merged
merged 4 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.1.0"
version = "2.1.1"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
366 changes: 225 additions & 141 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.go

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions pkg/apis/dfdaemon/v2/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ message DeletePersistentCacheTaskRequest {
string task_id = 1 [(validate.rules).string.min_len = 1];
}

// SyncHostRequest represents request of SyncHost.
message SyncHostRequest {
// Host id.
string host_id = 1 [(validate.rules).string.min_len = 1];
// Peer id.
string peer_id = 2 [(validate.rules).string.min_len = 1];
}

// DfdaemonUpload represents dfdaemon upload service.
service DfdaemonUpload {
// DownloadTask downloads task from p2p network.
Expand All @@ -219,6 +227,9 @@ service DfdaemonUpload {

// DeletePersistentCacheTask deletes persistent cache task from p2p network.
rpc DeletePersistentCacheTask(DeletePersistentCacheTaskRequest) returns(google.protobuf.Empty);

// SyncHost sync host info from parents.
rpc SyncHost(SyncHostRequest) returns (stream common.v2.Host);
}

// DfdaemonDownload represents dfdaemon download service.
Expand Down
65 changes: 65 additions & 0 deletions pkg/apis/dfdaemon/v2/dfdaemon_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions proto/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ message DeletePersistentCacheTaskRequest {
string task_id = 1;
}

// SyncHostRequest represents request of SyncHost.
message SyncHostRequest {
// Host id.
string host_id = 1;
// Peer id.
string peer_id = 2;
}

// DfdaemonUpload represents upload service of dfdaemon.
service DfdaemonUpload{
// DownloadTask downloads task from p2p network.
Expand All @@ -206,6 +214,9 @@ service DfdaemonUpload{

// DeletePersistentCacheTask deletes persistent cache task from p2p network.
rpc DeletePersistentCacheTask(DeletePersistentCacheTaskRequest) returns(google.protobuf.Empty);

// SyncHost sync host info from parents.
rpc SyncHost(SyncHostRequest) returns (stream common.v2.Host);
}

// DfdaemonDownload represents download service of dfdaemon.
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
Loading