Skip to content

Commit

Permalink
feat: remove response from UpdatePersistentCacheTask
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Jan 22, 2025
1 parent d4e497d commit 2a23158
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 103 deletions.
2 changes: 1 addition & 1 deletion 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.14"
version = "2.1.15"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
161 changes: 80 additions & 81 deletions pkg/apis/dfdaemon/v2/dfdaemon.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/dfdaemon/v2/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ service DfdaemonUpload {
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);

// UpdatePersistentCacheTask updates metadata of the persistent cache task in the peer.
rpc UpdatePersistentCacheTask(UpdatePersistentCacheTaskRequest) returns(common.v2.PersistentCacheTask);
rpc UpdatePersistentCacheTask(UpdatePersistentCacheTaskRequest) returns(google.protobuf.Empty);

// StatPersistentCacheTask stats persistent cache task information.
rpc StatPersistentCacheTask(StatPersistentCacheTaskRequest) returns(common.v2.PersistentCacheTask);
Expand Down
10 changes: 5 additions & 5 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.

8 changes: 4 additions & 4 deletions pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go

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

2 changes: 1 addition & 1 deletion proto/dfdaemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ service DfdaemonUpload{
rpc DownloadPersistentCacheTask(DownloadPersistentCacheTaskRequest) returns(stream DownloadPersistentCacheTaskResponse);

// UpdatePersistentCacheTask updates metadata of the persistent cache task in the peer.
rpc UpdatePersistentCacheTask(UpdatePersistentCacheTaskRequest) returns(common.v2.PersistentCacheTask);
rpc UpdatePersistentCacheTask(UpdatePersistentCacheTaskRequest) returns(google.protobuf.Empty);

// StatPersistentCacheTask stats persistent cache task information.
rpc StatPersistentCacheTask(StatPersistentCacheTaskRequest) returns(common.v2.PersistentCacheTask);
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
12 changes: 3 additions & 9 deletions src/dfdaemon.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,7 @@ pub mod dfdaemon_upload_client {
pub async fn update_persistent_cache_task(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePersistentCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::PersistentCacheTask>,
tonic::Status,
> {
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
Expand Down Expand Up @@ -1145,10 +1142,7 @@ pub mod dfdaemon_upload_server {
async fn update_persistent_cache_task(
&self,
request: tonic::Request<super::UpdatePersistentCacheTaskRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::common::v2::PersistentCacheTask>,
tonic::Status,
>;
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
/// StatPersistentCacheTask stats persistent cache task information.
async fn stat_persistent_cache_task(
&self,
Expand Down Expand Up @@ -1567,7 +1561,7 @@ pub mod dfdaemon_upload_server {
> tonic::server::UnaryService<
super::UpdatePersistentCacheTaskRequest,
> for UpdatePersistentCacheTaskSvc<T> {
type Response = super::super::super::common::v2::PersistentCacheTask;
type Response = ();
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
Expand Down

0 comments on commit 2a23158

Please sign in to comment.