diff --git a/Cargo.lock b/Cargo.lock index e87739b..ac39704 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,7 +184,7 @@ dependencies = [ [[package]] name = "dragonfly-api" -version = "2.0.147" +version = "2.0.148" dependencies = [ "prost", "prost-types", diff --git a/Cargo.toml b/Cargo.toml index 38f9edb..4fd5d71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dragonfly-api" -version = "2.0.147" +version = "2.0.148" authors = ["Gaius "] edition = "2021" license = "Apache-2.0" diff --git a/pkg/apis/dfdaemon/v2/dfdaemon.pb.go b/pkg/apis/dfdaemon/v2/dfdaemon.pb.go index ef05dda..5cbc5dd 100644 --- a/pkg/apis/dfdaemon/v2/dfdaemon.pb.go +++ b/pkg/apis/dfdaemon/v2/dfdaemon.pb.go @@ -1353,30 +1353,82 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0x90, 0x04, 0x0a, 0x0e, 0x44, 0x66, 0x64, 0x61, + 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0x91, 0x05, 0x0a, 0x0e, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x55, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x20, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x4f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, - 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x12, 0x56, 0x0a, 0x0d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x69, - 0x65, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x69, 0x65, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x01, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, + 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, + 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x4f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, + 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x0d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, + 0x69, 0x65, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x69, + 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x48, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x4e, 0x0a, 0x0f, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x23, + 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xbc, 0x05, 0x0a, 0x10, + 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x55, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x20, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, + 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, + 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x11, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x12, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x48, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, @@ -1386,54 +1438,11 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{ 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xbc, 0x05, 0x0a, 0x10, 0x44, - 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x55, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x20, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x08, - 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, - 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x11, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x4c, 0x0a, 0x0f, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x48, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x21, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x4e, 0x0a, 0x0f, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x2e, 0x64, - 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2d, 0x5a, 0x2b, 0x64, 0x37, 0x79, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x3b, - 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2d, 0x5a, 0x2b, 0x64, 0x37, + 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x32, + 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1492,37 +1501,41 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{ 22, // 12: dfdaemon.v2.UploadCacheTaskRequest.ttl:type_name -> google.protobuf.Duration 22, // 13: dfdaemon.v2.UploadCacheTaskRequest.timeout:type_name -> google.protobuf.Duration 0, // 14: dfdaemon.v2.DfdaemonUpload.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest - 4, // 15: dfdaemon.v2.DfdaemonUpload.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest - 6, // 16: dfdaemon.v2.DfdaemonUpload.DownloadPiece:input_type -> dfdaemon.v2.DownloadPieceRequest - 11, // 17: dfdaemon.v2.DfdaemonUpload.DownloadCacheTask:input_type -> dfdaemon.v2.DownloadCacheTaskRequest - 15, // 18: dfdaemon.v2.DfdaemonUpload.StatCacheTask:input_type -> dfdaemon.v2.StatCacheTaskRequest - 16, // 19: dfdaemon.v2.DfdaemonUpload.DeleteCacheTask:input_type -> dfdaemon.v2.DeleteCacheTaskRequest - 0, // 20: dfdaemon.v2.DfdaemonDownload.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest - 8, // 21: dfdaemon.v2.DfdaemonDownload.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest - 9, // 22: dfdaemon.v2.DfdaemonDownload.StatTask:input_type -> dfdaemon.v2.StatTaskRequest - 10, // 23: dfdaemon.v2.DfdaemonDownload.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest - 23, // 24: dfdaemon.v2.DfdaemonDownload.DeleteHost:input_type -> google.protobuf.Empty - 11, // 25: dfdaemon.v2.DfdaemonDownload.DownloadCacheTask:input_type -> dfdaemon.v2.DownloadCacheTaskRequest - 14, // 26: dfdaemon.v2.DfdaemonDownload.UploadCacheTask:input_type -> dfdaemon.v2.UploadCacheTaskRequest - 15, // 27: dfdaemon.v2.DfdaemonDownload.StatCacheTask:input_type -> dfdaemon.v2.StatCacheTaskRequest - 16, // 28: dfdaemon.v2.DfdaemonDownload.DeleteCacheTask:input_type -> dfdaemon.v2.DeleteCacheTaskRequest - 3, // 29: dfdaemon.v2.DfdaemonUpload.DownloadTask:output_type -> dfdaemon.v2.DownloadTaskResponse - 5, // 30: dfdaemon.v2.DfdaemonUpload.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse - 7, // 31: dfdaemon.v2.DfdaemonUpload.DownloadPiece:output_type -> dfdaemon.v2.DownloadPieceResponse - 13, // 32: dfdaemon.v2.DfdaemonUpload.DownloadCacheTask:output_type -> dfdaemon.v2.DownloadCacheTaskResponse - 24, // 33: dfdaemon.v2.DfdaemonUpload.StatCacheTask:output_type -> common.v2.CacheTask - 23, // 34: dfdaemon.v2.DfdaemonUpload.DeleteCacheTask:output_type -> google.protobuf.Empty - 3, // 35: dfdaemon.v2.DfdaemonDownload.DownloadTask:output_type -> dfdaemon.v2.DownloadTaskResponse - 23, // 36: dfdaemon.v2.DfdaemonDownload.UploadTask:output_type -> google.protobuf.Empty - 21, // 37: dfdaemon.v2.DfdaemonDownload.StatTask:output_type -> common.v2.Task - 23, // 38: dfdaemon.v2.DfdaemonDownload.DeleteTask:output_type -> google.protobuf.Empty - 23, // 39: dfdaemon.v2.DfdaemonDownload.DeleteHost:output_type -> google.protobuf.Empty - 13, // 40: dfdaemon.v2.DfdaemonDownload.DownloadCacheTask:output_type -> dfdaemon.v2.DownloadCacheTaskResponse - 24, // 41: dfdaemon.v2.DfdaemonDownload.UploadCacheTask:output_type -> common.v2.CacheTask - 24, // 42: dfdaemon.v2.DfdaemonDownload.StatCacheTask:output_type -> common.v2.CacheTask - 23, // 43: dfdaemon.v2.DfdaemonDownload.DeleteCacheTask:output_type -> google.protobuf.Empty - 29, // [29:44] is the sub-list for method output_type - 14, // [14:29] is the sub-list for method input_type + 9, // 15: dfdaemon.v2.DfdaemonUpload.StatTask:input_type -> dfdaemon.v2.StatTaskRequest + 10, // 16: dfdaemon.v2.DfdaemonUpload.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest + 4, // 17: dfdaemon.v2.DfdaemonUpload.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest + 6, // 18: dfdaemon.v2.DfdaemonUpload.DownloadPiece:input_type -> dfdaemon.v2.DownloadPieceRequest + 11, // 19: dfdaemon.v2.DfdaemonUpload.DownloadCacheTask:input_type -> dfdaemon.v2.DownloadCacheTaskRequest + 15, // 20: dfdaemon.v2.DfdaemonUpload.StatCacheTask:input_type -> dfdaemon.v2.StatCacheTaskRequest + 16, // 21: dfdaemon.v2.DfdaemonUpload.DeleteCacheTask:input_type -> dfdaemon.v2.DeleteCacheTaskRequest + 0, // 22: dfdaemon.v2.DfdaemonDownload.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest + 8, // 23: dfdaemon.v2.DfdaemonDownload.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest + 9, // 24: dfdaemon.v2.DfdaemonDownload.StatTask:input_type -> dfdaemon.v2.StatTaskRequest + 10, // 25: dfdaemon.v2.DfdaemonDownload.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest + 23, // 26: dfdaemon.v2.DfdaemonDownload.DeleteHost:input_type -> google.protobuf.Empty + 11, // 27: dfdaemon.v2.DfdaemonDownload.DownloadCacheTask:input_type -> dfdaemon.v2.DownloadCacheTaskRequest + 14, // 28: dfdaemon.v2.DfdaemonDownload.UploadCacheTask:input_type -> dfdaemon.v2.UploadCacheTaskRequest + 15, // 29: dfdaemon.v2.DfdaemonDownload.StatCacheTask:input_type -> dfdaemon.v2.StatCacheTaskRequest + 16, // 30: dfdaemon.v2.DfdaemonDownload.DeleteCacheTask:input_type -> dfdaemon.v2.DeleteCacheTaskRequest + 3, // 31: dfdaemon.v2.DfdaemonUpload.DownloadTask:output_type -> dfdaemon.v2.DownloadTaskResponse + 21, // 32: dfdaemon.v2.DfdaemonUpload.StatTask:output_type -> common.v2.Task + 23, // 33: dfdaemon.v2.DfdaemonUpload.DeleteTask:output_type -> google.protobuf.Empty + 5, // 34: dfdaemon.v2.DfdaemonUpload.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse + 7, // 35: dfdaemon.v2.DfdaemonUpload.DownloadPiece:output_type -> dfdaemon.v2.DownloadPieceResponse + 13, // 36: dfdaemon.v2.DfdaemonUpload.DownloadCacheTask:output_type -> dfdaemon.v2.DownloadCacheTaskResponse + 24, // 37: dfdaemon.v2.DfdaemonUpload.StatCacheTask:output_type -> common.v2.CacheTask + 23, // 38: dfdaemon.v2.DfdaemonUpload.DeleteCacheTask:output_type -> google.protobuf.Empty + 3, // 39: dfdaemon.v2.DfdaemonDownload.DownloadTask:output_type -> dfdaemon.v2.DownloadTaskResponse + 23, // 40: dfdaemon.v2.DfdaemonDownload.UploadTask:output_type -> google.protobuf.Empty + 21, // 41: dfdaemon.v2.DfdaemonDownload.StatTask:output_type -> common.v2.Task + 23, // 42: dfdaemon.v2.DfdaemonDownload.DeleteTask:output_type -> google.protobuf.Empty + 23, // 43: dfdaemon.v2.DfdaemonDownload.DeleteHost:output_type -> google.protobuf.Empty + 13, // 44: dfdaemon.v2.DfdaemonDownload.DownloadCacheTask:output_type -> dfdaemon.v2.DownloadCacheTaskResponse + 24, // 45: dfdaemon.v2.DfdaemonDownload.UploadCacheTask:output_type -> common.v2.CacheTask + 24, // 46: dfdaemon.v2.DfdaemonDownload.StatCacheTask:output_type -> common.v2.CacheTask + 23, // 47: dfdaemon.v2.DfdaemonDownload.DeleteCacheTask:output_type -> google.protobuf.Empty + 31, // [31:48] is the sub-list for method output_type + 14, // [14:31] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name diff --git a/pkg/apis/dfdaemon/v2/dfdaemon.proto b/pkg/apis/dfdaemon/v2/dfdaemon.proto index 145ad17..fff42b1 100644 --- a/pkg/apis/dfdaemon/v2/dfdaemon.proto +++ b/pkg/apis/dfdaemon/v2/dfdaemon.proto @@ -199,6 +199,12 @@ service DfdaemonUpload { // DownloadTask downloads task from p2p network. rpc DownloadTask(DownloadTaskRequest) returns(stream DownloadTaskResponse); + // StatTask stats task information. + rpc StatTask(StatTaskRequest) returns(common.v2.Task); + + // DeleteTask deletes task from p2p network. + rpc DeleteTask(DeleteTaskRequest) returns(google.protobuf.Empty); + // SyncPieces syncs piece metadatas from remote peer. rpc SyncPieces(SyncPiecesRequest) returns(stream SyncPiecesResponse); diff --git a/pkg/apis/dfdaemon/v2/dfdaemon_grpc.pb.go b/pkg/apis/dfdaemon/v2/dfdaemon_grpc.pb.go index 71b19b3..4de997a 100644 --- a/pkg/apis/dfdaemon/v2/dfdaemon_grpc.pb.go +++ b/pkg/apis/dfdaemon/v2/dfdaemon_grpc.pb.go @@ -26,6 +26,10 @@ const _ = grpc.SupportPackageIsVersion7 type DfdaemonUploadClient interface { // DownloadTask downloads task from p2p network. DownloadTask(ctx context.Context, in *DownloadTaskRequest, opts ...grpc.CallOption) (DfdaemonUpload_DownloadTaskClient, error) + // StatTask stats task information. + StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*v2.Task, error) + // DeleteTask deletes task from p2p network. + DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // SyncPieces syncs piece metadatas from remote peer. SyncPieces(ctx context.Context, in *SyncPiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncPiecesClient, error) // DownloadPiece downloads piece from the remote peer. @@ -78,6 +82,24 @@ func (x *dfdaemonUploadDownloadTaskClient) Recv() (*DownloadTaskResponse, error) return m, nil } +func (c *dfdaemonUploadClient) StatTask(ctx context.Context, in *StatTaskRequest, opts ...grpc.CallOption) (*v2.Task, error) { + out := new(v2.Task) + err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonUpload/StatTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dfdaemonUploadClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonUpload/DeleteTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *dfdaemonUploadClient) SyncPieces(ctx context.Context, in *SyncPiecesRequest, opts ...grpc.CallOption) (DfdaemonUpload_SyncPiecesClient, error) { stream, err := c.cc.NewStream(ctx, &DfdaemonUpload_ServiceDesc.Streams[1], "/dfdaemon.v2.DfdaemonUpload/SyncPieces", opts...) if err != nil { @@ -175,6 +197,10 @@ func (c *dfdaemonUploadClient) DeleteCacheTask(ctx context.Context, in *DeleteCa type DfdaemonUploadServer interface { // DownloadTask downloads task from p2p network. DownloadTask(*DownloadTaskRequest, DfdaemonUpload_DownloadTaskServer) error + // StatTask stats task information. + StatTask(context.Context, *StatTaskRequest) (*v2.Task, error) + // DeleteTask deletes task from p2p network. + DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) // SyncPieces syncs piece metadatas from remote peer. SyncPieces(*SyncPiecesRequest, DfdaemonUpload_SyncPiecesServer) error // DownloadPiece downloads piece from the remote peer. @@ -194,6 +220,12 @@ type UnimplementedDfdaemonUploadServer struct { func (UnimplementedDfdaemonUploadServer) DownloadTask(*DownloadTaskRequest, DfdaemonUpload_DownloadTaskServer) error { return status.Errorf(codes.Unimplemented, "method DownloadTask not implemented") } +func (UnimplementedDfdaemonUploadServer) StatTask(context.Context, *StatTaskRequest) (*v2.Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method StatTask not implemented") +} +func (UnimplementedDfdaemonUploadServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented") +} func (UnimplementedDfdaemonUploadServer) SyncPieces(*SyncPiecesRequest, DfdaemonUpload_SyncPiecesServer) error { return status.Errorf(codes.Unimplemented, "method SyncPieces not implemented") } @@ -242,6 +274,42 @@ func (x *dfdaemonUploadDownloadTaskServer) Send(m *DownloadTaskResponse) error { return x.ServerStream.SendMsg(m) } +func _DfdaemonUpload_StatTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DfdaemonUploadServer).StatTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dfdaemon.v2.DfdaemonUpload/StatTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DfdaemonUploadServer).StatTask(ctx, req.(*StatTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DfdaemonUpload_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DfdaemonUploadServer).DeleteTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dfdaemon.v2.DfdaemonUpload/DeleteTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DfdaemonUploadServer).DeleteTask(ctx, req.(*DeleteTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _DfdaemonUpload_SyncPieces_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SyncPiecesRequest) if err := stream.RecvMsg(m); err != nil { @@ -345,6 +413,14 @@ var DfdaemonUpload_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dfdaemon.v2.DfdaemonUpload", HandlerType: (*DfdaemonUploadServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "StatTask", + Handler: _DfdaemonUpload_StatTask_Handler, + }, + { + MethodName: "DeleteTask", + Handler: _DfdaemonUpload_DeleteTask_Handler, + }, { MethodName: "DownloadPiece", Handler: _DfdaemonUpload_DownloadPiece_Handler, diff --git a/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go b/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go index 04c5ca1..cb6c2c3 100644 --- a/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go +++ b/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go @@ -64,6 +64,26 @@ func (mr *MockDfdaemonUploadClientMockRecorder) DeleteCacheTask(ctx, in any, opt return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DeleteCacheTask), varargs...) } +// DeleteTask mocks base method. +func (m *MockDfdaemonUploadClient) DeleteTask(ctx context.Context, in *dfdaemon.DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteTask", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteTask indicates an expected call of DeleteTask. +func (mr *MockDfdaemonUploadClientMockRecorder) DeleteTask(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DeleteTask), varargs...) +} + // DownloadCacheTask mocks base method. func (m *MockDfdaemonUploadClient) DownloadCacheTask(ctx context.Context, in *dfdaemon.DownloadCacheTaskRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonUpload_DownloadCacheTaskClient, error) { m.ctrl.T.Helper() @@ -144,6 +164,26 @@ func (mr *MockDfdaemonUploadClientMockRecorder) StatCacheTask(ctx, in any, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).StatCacheTask), varargs...) } +// StatTask mocks base method. +func (m *MockDfdaemonUploadClient) StatTask(ctx context.Context, in *dfdaemon.StatTaskRequest, opts ...grpc.CallOption) (*common.Task, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StatTask", varargs...) + ret0, _ := ret[0].(*common.Task) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatTask indicates an expected call of StatTask. +func (mr *MockDfdaemonUploadClientMockRecorder) StatTask(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).StatTask), varargs...) +} + // SyncPieces mocks base method. func (m *MockDfdaemonUploadClient) SyncPieces(ctx context.Context, in *dfdaemon.SyncPiecesRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonUpload_SyncPiecesClient, error) { m.ctrl.T.Helper() @@ -571,6 +611,21 @@ func (mr *MockDfdaemonUploadServerMockRecorder) DeleteCacheTask(arg0, arg1 any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DeleteCacheTask), arg0, arg1) } +// DeleteTask mocks base method. +func (m *MockDfdaemonUploadServer) DeleteTask(arg0 context.Context, arg1 *dfdaemon.DeleteTaskRequest) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteTask", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteTask indicates an expected call of DeleteTask. +func (mr *MockDfdaemonUploadServerMockRecorder) DeleteTask(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DeleteTask), arg0, arg1) +} + // DownloadCacheTask mocks base method. func (m *MockDfdaemonUploadServer) DownloadCacheTask(arg0 *dfdaemon.DownloadCacheTaskRequest, arg1 dfdaemon.DfdaemonUpload_DownloadCacheTaskServer) error { m.ctrl.T.Helper() @@ -629,6 +684,21 @@ func (mr *MockDfdaemonUploadServerMockRecorder) StatCacheTask(arg0, arg1 any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).StatCacheTask), arg0, arg1) } +// StatTask mocks base method. +func (m *MockDfdaemonUploadServer) StatTask(arg0 context.Context, arg1 *dfdaemon.StatTaskRequest) (*common.Task, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StatTask", arg0, arg1) + ret0, _ := ret[0].(*common.Task) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatTask indicates an expected call of StatTask. +func (mr *MockDfdaemonUploadServerMockRecorder) StatTask(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).StatTask), arg0, arg1) +} + // SyncPieces mocks base method. func (m *MockDfdaemonUploadServer) SyncPieces(arg0 *dfdaemon.SyncPiecesRequest, arg1 dfdaemon.DfdaemonUpload_SyncPiecesServer) error { m.ctrl.T.Helper() diff --git a/proto/dfdaemon.proto b/proto/dfdaemon.proto index 82002c1..7d6c670 100644 --- a/proto/dfdaemon.proto +++ b/proto/dfdaemon.proto @@ -186,6 +186,12 @@ service DfdaemonUpload{ // DownloadTask downloads task from p2p network. rpc DownloadTask(DownloadTaskRequest) returns(stream DownloadTaskResponse); + // StatTask stats task information. + rpc StatTask(StatTaskRequest) returns(common.v2.Task); + + // DeleteTask deletes task from p2p network. + rpc DeleteTask(DeleteTaskRequest) returns(google.protobuf.Empty); + // SyncPieces syncs piece metadatas from remote peer. rpc SyncPieces(SyncPiecesRequest) returns(stream SyncPiecesResponse); diff --git a/src/descriptor.bin b/src/descriptor.bin index 013d020..9567bc8 100644 Binary files a/src/descriptor.bin and b/src/descriptor.bin differ diff --git a/src/dfdaemon.v2.rs b/src/dfdaemon.v2.rs index e7e0af5..788b8be 100644 --- a/src/dfdaemon.v2.rs +++ b/src/dfdaemon.v2.rs @@ -359,6 +359,55 @@ pub mod dfdaemon_upload_client { .insert(GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DownloadTask")); self.inner.server_streaming(req, path, codec).await } + /// StatTask stats task information. + pub async fn stat_task( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/dfdaemon.v2.DfdaemonUpload/StatTask", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "StatTask")); + self.inner.unary(req, path, codec).await + } + /// DeleteTask deletes task from p2p network. + pub async fn delete_task( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/dfdaemon.v2.DfdaemonUpload/DeleteTask", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("dfdaemon.v2.DfdaemonUpload", "DeleteTask")); + self.inner.unary(req, path, codec).await + } /// SyncPieces syncs piece metadatas from remote peer. pub async fn sync_pieces( &mut self, @@ -808,6 +857,19 @@ pub mod dfdaemon_upload_server { tonic::Response, tonic::Status, >; + /// StatTask stats task information. + async fn stat_task( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DeleteTask deletes task from p2p network. + async fn delete_task( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; /// Server streaming response type for the SyncPieces method. type SyncPiecesStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, @@ -981,6 +1043,96 @@ pub mod dfdaemon_upload_server { }; Box::pin(fut) } + "/dfdaemon.v2.DfdaemonUpload/StatTask" => { + #[allow(non_camel_case_types)] + struct StatTaskSvc(pub Arc); + impl< + T: DfdaemonUpload, + > tonic::server::UnaryService + for StatTaskSvc { + type Response = super::super::super::common::v2::Task; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::stat_task(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = StatTaskSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/dfdaemon.v2.DfdaemonUpload/DeleteTask" => { + #[allow(non_camel_case_types)] + struct DeleteTaskSvc(pub Arc); + impl< + T: DfdaemonUpload, + > tonic::server::UnaryService + for DeleteTaskSvc { + type Response = (); + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::delete_task(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = DeleteTaskSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } "/dfdaemon.v2.DfdaemonUpload/SyncPieces" => { #[allow(non_camel_case_types)] struct SyncPiecesSvc(pub Arc);