mirror of https://github.com/dragonflyoss/api.git
feat: replace LeaveHostRequest with empty (#271)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
b9e871c8cc
commit
4ca58f1c92
|
|
@ -160,7 +160,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "dragonfly-api"
|
||||
version = "2.0.93"
|
||||
version = "2.0.94"
|
||||
dependencies = [
|
||||
"prost 0.11.9",
|
||||
"prost-types 0.12.3",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dragonfly-api"
|
||||
version = "2.0.93"
|
||||
version = "2.0.94"
|
||||
authors = ["Gaius <gaius.qi@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
|
|
|
|||
|
|
@ -571,55 +571,6 @@ func (x *DeleteTaskRequest) GetUrlMeta() *v1.UrlMeta {
|
|||
return nil
|
||||
}
|
||||
|
||||
// LeaveHostRequest represents request of LeaveHost.
|
||||
type LeaveHostRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Host id.
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) Reset() {
|
||||
*x = LeaveHostRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_dfdaemon_v1_dfdaemon_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LeaveHostRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_dfdaemon_v1_dfdaemon_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LeaveHostRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LeaveHostRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_pkg_apis_dfdaemon_v1_dfdaemon_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDesc = []byte{
|
||||
|
|
@ -709,50 +660,47 @@ var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDesc = []byte{
|
|||
0x34, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x72, 0x6c, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x75, 0x72,
|
||||
0x6c, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02,
|
||||
0x69, 0x64, 0x32, 0xd0, 0x04, 0x0a, 0x06, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x39, 0x0a,
|
||||
0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x15, 0x2e, 0x64, 0x66, 0x64, 0x61,
|
||||
0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x14, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x77, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50,
|
||||
0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 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, 0x43, 0x0a, 0x0e, 0x53, 0x79, 0x6e, 0x63, 0x50,
|
||||
0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x08,
|
||||
0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 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, 0x41, 0x0a, 0x0a, 0x49,
|
||||
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x64, 0x66, 0x64, 0x61,
|
||||
0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x6c, 0x4d, 0x65, 0x74, 0x61, 0x32, 0xcc, 0x04, 0x0a, 0x06, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e,
|
||||
0x12, 0x39, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x15, 0x2e, 0x64,
|
||||
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44,
|
||||
0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x0d, 0x47,
|
||||
0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x43,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 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, 0x43, 0x0a, 0x0e, 0x53, 0x79,
|
||||
0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x50, 0x69, 0x65, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12,
|
||||
0x3d, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x64, 0x66,
|
||||
0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 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, 0x41,
|
||||
0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x64,
|
||||
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61,
|
||||
0x0a, 0x0a, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x64,
|
||||
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 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, 0x41, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12,
|
||||
0x1b, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
|
||||
0x79, 0x12, 0x41, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12,
|
||||
0x1b, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72,
|
||||
0x74, 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, 0x3f, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x12, 0x1a, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x65, 0x61,
|
||||
0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 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, 0x31, 0x3b, 0x64, 0x66, 0x64, 0x61,
|
||||
0x65, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 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, 0x3b, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 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, 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, 0x31, 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65,
|
||||
0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -767,7 +715,7 @@ func file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDescGZIP() []byte {
|
|||
return file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_goTypes = []interface{}{
|
||||
(*DownRequest)(nil), // 0: dfdaemon.DownRequest
|
||||
(*DownResult)(nil), // 1: dfdaemon.DownResult
|
||||
|
|
@ -775,38 +723,37 @@ var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_goTypes = []interface{}{
|
|||
(*ImportTaskRequest)(nil), // 3: dfdaemon.ImportTaskRequest
|
||||
(*ExportTaskRequest)(nil), // 4: dfdaemon.ExportTaskRequest
|
||||
(*DeleteTaskRequest)(nil), // 5: dfdaemon.DeleteTaskRequest
|
||||
(*LeaveHostRequest)(nil), // 6: dfdaemon.LeaveHostRequest
|
||||
(*v1.UrlMeta)(nil), // 7: common.UrlMeta
|
||||
(v1.TaskType)(0), // 8: common.TaskType
|
||||
(*v1.PieceTaskRequest)(nil), // 9: common.PieceTaskRequest
|
||||
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
|
||||
(*v1.PiecePacket)(nil), // 11: common.PiecePacket
|
||||
(*v1.UrlMeta)(nil), // 6: common.UrlMeta
|
||||
(v1.TaskType)(0), // 7: common.TaskType
|
||||
(*v1.PieceTaskRequest)(nil), // 8: common.PieceTaskRequest
|
||||
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
|
||||
(*v1.PiecePacket)(nil), // 10: common.PiecePacket
|
||||
}
|
||||
var file_pkg_apis_dfdaemon_v1_dfdaemon_proto_depIdxs = []int32{
|
||||
7, // 0: dfdaemon.DownRequest.url_meta:type_name -> common.UrlMeta
|
||||
7, // 1: dfdaemon.StatTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
7, // 2: dfdaemon.ImportTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
8, // 3: dfdaemon.ImportTaskRequest.type:type_name -> common.TaskType
|
||||
7, // 4: dfdaemon.ExportTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
7, // 5: dfdaemon.DeleteTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
6, // 0: dfdaemon.DownRequest.url_meta:type_name -> common.UrlMeta
|
||||
6, // 1: dfdaemon.StatTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
6, // 2: dfdaemon.ImportTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
7, // 3: dfdaemon.ImportTaskRequest.type:type_name -> common.TaskType
|
||||
6, // 4: dfdaemon.ExportTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
6, // 5: dfdaemon.DeleteTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
0, // 6: dfdaemon.Daemon.Download:input_type -> dfdaemon.DownRequest
|
||||
9, // 7: dfdaemon.Daemon.GetPieceTasks:input_type -> common.PieceTaskRequest
|
||||
10, // 8: dfdaemon.Daemon.CheckHealth:input_type -> google.protobuf.Empty
|
||||
9, // 9: dfdaemon.Daemon.SyncPieceTasks:input_type -> common.PieceTaskRequest
|
||||
8, // 7: dfdaemon.Daemon.GetPieceTasks:input_type -> common.PieceTaskRequest
|
||||
9, // 8: dfdaemon.Daemon.CheckHealth:input_type -> google.protobuf.Empty
|
||||
8, // 9: dfdaemon.Daemon.SyncPieceTasks:input_type -> common.PieceTaskRequest
|
||||
2, // 10: dfdaemon.Daemon.StatTask:input_type -> dfdaemon.StatTaskRequest
|
||||
3, // 11: dfdaemon.Daemon.ImportTask:input_type -> dfdaemon.ImportTaskRequest
|
||||
4, // 12: dfdaemon.Daemon.ExportTask:input_type -> dfdaemon.ExportTaskRequest
|
||||
5, // 13: dfdaemon.Daemon.DeleteTask:input_type -> dfdaemon.DeleteTaskRequest
|
||||
6, // 14: dfdaemon.Daemon.LeaveHost:input_type -> dfdaemon.LeaveHostRequest
|
||||
9, // 14: dfdaemon.Daemon.LeaveHost:input_type -> google.protobuf.Empty
|
||||
1, // 15: dfdaemon.Daemon.Download:output_type -> dfdaemon.DownResult
|
||||
11, // 16: dfdaemon.Daemon.GetPieceTasks:output_type -> common.PiecePacket
|
||||
10, // 17: dfdaemon.Daemon.CheckHealth:output_type -> google.protobuf.Empty
|
||||
11, // 18: dfdaemon.Daemon.SyncPieceTasks:output_type -> common.PiecePacket
|
||||
10, // 19: dfdaemon.Daemon.StatTask:output_type -> google.protobuf.Empty
|
||||
10, // 20: dfdaemon.Daemon.ImportTask:output_type -> google.protobuf.Empty
|
||||
10, // 21: dfdaemon.Daemon.ExportTask:output_type -> google.protobuf.Empty
|
||||
10, // 22: dfdaemon.Daemon.DeleteTask:output_type -> google.protobuf.Empty
|
||||
10, // 23: dfdaemon.Daemon.LeaveHost:output_type -> google.protobuf.Empty
|
||||
10, // 16: dfdaemon.Daemon.GetPieceTasks:output_type -> common.PiecePacket
|
||||
9, // 17: dfdaemon.Daemon.CheckHealth:output_type -> google.protobuf.Empty
|
||||
10, // 18: dfdaemon.Daemon.SyncPieceTasks:output_type -> common.PiecePacket
|
||||
9, // 19: dfdaemon.Daemon.StatTask:output_type -> google.protobuf.Empty
|
||||
9, // 20: dfdaemon.Daemon.ImportTask:output_type -> google.protobuf.Empty
|
||||
9, // 21: dfdaemon.Daemon.ExportTask:output_type -> google.protobuf.Empty
|
||||
9, // 22: dfdaemon.Daemon.DeleteTask:output_type -> google.protobuf.Empty
|
||||
9, // 23: dfdaemon.Daemon.LeaveHost:output_type -> google.protobuf.Empty
|
||||
15, // [15:24] is the sub-list for method output_type
|
||||
6, // [6:15] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
|
|
@ -892,18 +839,6 @@ func file_pkg_apis_dfdaemon_v1_dfdaemon_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_dfdaemon_v1_dfdaemon_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LeaveHostRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
@ -911,7 +846,7 @@ func file_pkg_apis_dfdaemon_v1_dfdaemon_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_apis_dfdaemon_v1_dfdaemon_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1043,114 +1043,3 @@ var _ interface {
|
|||
Cause() error
|
||||
ErrorName() string
|
||||
} = DeleteTaskRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on LeaveHostRequest with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
func (m *LeaveHostRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on LeaveHostRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// LeaveHostRequestMultiError, or nil if none found.
|
||||
func (m *LeaveHostRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *LeaveHostRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if utf8.RuneCountInString(m.GetId()) < 1 {
|
||||
err := LeaveHostRequestValidationError{
|
||||
field: "Id",
|
||||
reason: "value length must be at least 1 runes",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return LeaveHostRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// LeaveHostRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by LeaveHostRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type LeaveHostRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m LeaveHostRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m LeaveHostRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// LeaveHostRequestValidationError is the validation error returned by
|
||||
// LeaveHostRequest.Validate if the designated constraints aren't met.
|
||||
type LeaveHostRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e LeaveHostRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e LeaveHostRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e LeaveHostRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e LeaveHostRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e LeaveHostRequestValidationError) ErrorName() string { return "LeaveHostRequestValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e LeaveHostRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sLeaveHostRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = LeaveHostRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = LeaveHostRequestValidationError{}
|
||||
|
|
|
|||
|
|
@ -110,12 +110,6 @@ message DeleteTaskRequest{
|
|||
common.UrlMeta url_meta = 2 [(validate.rules).message.required = true];
|
||||
}
|
||||
|
||||
// LeaveHostRequest represents request of LeaveHost.
|
||||
message LeaveHostRequest{
|
||||
// Host id.
|
||||
string id = 1 [(validate.rules).string.min_len = 1];
|
||||
}
|
||||
|
||||
// Daemon Client RPC Service
|
||||
service Daemon{
|
||||
// Trigger client to download file
|
||||
|
|
@ -135,5 +129,5 @@ service Daemon{
|
|||
// Delete file from P2P cache system
|
||||
rpc DeleteTask(DeleteTaskRequest) returns(google.protobuf.Empty);
|
||||
// LeaveHost releases host in scheduler.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
rpc LeaveHost(google.protobuf.Empty)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ type DaemonClient interface {
|
|||
// Delete file from P2P cache system
|
||||
DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// LeaveHost releases host in scheduler.
|
||||
LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type daemonClient struct {
|
||||
|
|
@ -169,7 +169,7 @@ func (c *daemonClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, op
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *daemonClient) LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *daemonClient) LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/dfdaemon.Daemon/LeaveHost", in, out, opts...)
|
||||
if err != nil {
|
||||
|
|
@ -199,7 +199,7 @@ type DaemonServer interface {
|
|||
// Delete file from P2P cache system
|
||||
DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error)
|
||||
// LeaveHost releases host in scheduler.
|
||||
LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error)
|
||||
LeaveHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedDaemonServer should be embedded to have forward compatible implementations.
|
||||
|
|
@ -230,7 +230,7 @@ func (UnimplementedDaemonServer) ExportTask(context.Context, *ExportTaskRequest)
|
|||
func (UnimplementedDaemonServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented")
|
||||
}
|
||||
func (UnimplementedDaemonServer) LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error) {
|
||||
func (UnimplementedDaemonServer) LeaveHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LeaveHost not implemented")
|
||||
}
|
||||
|
||||
|
|
@ -401,7 +401,7 @@ func _Daemon_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||
}
|
||||
|
||||
func _Daemon_LeaveHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LeaveHostRequest)
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ func _Daemon_LeaveHost_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||
FullMethod: "/dfdaemon.Daemon/LeaveHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaemonServer).LeaveHost(ctx, req.(*LeaveHostRequest))
|
||||
return srv.(DaemonServer).LeaveHost(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ func (mr *MockDaemonClientMockRecorder) ImportTask(ctx, in any, opts ...any) *go
|
|||
}
|
||||
|
||||
// LeaveHost mocks base method.
|
||||
func (m *MockDaemonClient) LeaveHost(ctx context.Context, in *dfdaemon.LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockDaemonClient) LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
|
|
@ -596,7 +596,7 @@ func (mr *MockDaemonServerMockRecorder) ImportTask(arg0, arg1 any) *gomock.Call
|
|||
}
|
||||
|
||||
// LeaveHost mocks base method.
|
||||
func (m *MockDaemonServer) LeaveHost(arg0 context.Context, arg1 *dfdaemon.LeaveHostRequest) (*emptypb.Empty, error) {
|
||||
func (m *MockDaemonServer) LeaveHost(arg0 context.Context, arg1 *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "LeaveHost", arg0, arg1)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
|
|
|
|||
|
|
@ -751,55 +751,6 @@ func (x *DeleteTaskRequest) GetTaskId() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
// LeaveHostRequest represents request of LeaveHost.
|
||||
type LeaveHostRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Host id.
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) Reset() {
|
||||
*x = LeaveHostRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LeaveHostRequest) ProtoMessage() {}
|
||||
|
||||
func (x *LeaveHostRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LeaveHostRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LeaveHostRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *LeaveHostRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_pkg_apis_dfdaemon_v2_dfdaemon_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
|
||||
|
|
@ -907,54 +858,50 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
|
|||
0x65, 0x6c, 0x65, 0x74, 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, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32,
|
||||
0x91, 0x02, 0x0a, 0x0e, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x55, 0x70, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x12, 0x56, 0x0a, 0x13, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x6f, 0x77,
|
||||
0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x27, 0x2e, 0x64, 0x66, 0x64, 0x61,
|
||||
0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44,
|
||||
0x6f, 0x77, 0x6e, 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, 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, 0x32, 0xf4, 0x02, 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,
|
||||
0x49, 0x64, 0x32, 0x91, 0x02, 0x0a, 0x0e, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x55,
|
||||
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x56, 0x0a, 0x13, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72,
|
||||
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x27, 0x2e, 0x64,
|
||||
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67,
|
||||
0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 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, 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, 0x32, 0xed, 0x02, 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, 0x3b, 0x0a, 0x09, 0x4c, 0x65, 0x61,
|
||||
0x76, 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, 0x42, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 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,
|
||||
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 (
|
||||
|
|
@ -969,7 +916,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP() []byte {
|
|||
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_goTypes = []interface{}{
|
||||
(*TriggerDownloadTaskRequest)(nil), // 0: dfdaemon.v2.TriggerDownloadTaskRequest
|
||||
(*SyncPiecesRequest)(nil), // 1: dfdaemon.v2.SyncPiecesRequest
|
||||
|
|
@ -983,25 +930,24 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_goTypes = []interface{}{
|
|||
(*UploadTaskRequest)(nil), // 9: dfdaemon.v2.UploadTaskRequest
|
||||
(*StatTaskRequest)(nil), // 10: dfdaemon.v2.StatTaskRequest
|
||||
(*DeleteTaskRequest)(nil), // 11: dfdaemon.v2.DeleteTaskRequest
|
||||
(*LeaveHostRequest)(nil), // 12: dfdaemon.v2.LeaveHostRequest
|
||||
nil, // 13: dfdaemon.v2.DownloadTaskStartedResponse.ResponseHeaderEntry
|
||||
(*v2.Download)(nil), // 14: common.v2.Download
|
||||
(*v2.Piece)(nil), // 15: common.v2.Piece
|
||||
(*v2.Range)(nil), // 16: common.v2.Range
|
||||
(*v2.Task)(nil), // 17: common.v2.Task
|
||||
(*emptypb.Empty)(nil), // 18: google.protobuf.Empty
|
||||
nil, // 12: dfdaemon.v2.DownloadTaskStartedResponse.ResponseHeaderEntry
|
||||
(*v2.Download)(nil), // 13: common.v2.Download
|
||||
(*v2.Piece)(nil), // 14: common.v2.Piece
|
||||
(*v2.Range)(nil), // 15: common.v2.Range
|
||||
(*v2.Task)(nil), // 16: common.v2.Task
|
||||
(*emptypb.Empty)(nil), // 17: google.protobuf.Empty
|
||||
}
|
||||
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{
|
||||
14, // 0: dfdaemon.v2.TriggerDownloadTaskRequest.download:type_name -> common.v2.Download
|
||||
15, // 1: dfdaemon.v2.DownloadPieceResponse.piece:type_name -> common.v2.Piece
|
||||
14, // 2: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download
|
||||
16, // 3: dfdaemon.v2.DownloadTaskStartedResponse.range:type_name -> common.v2.Range
|
||||
13, // 4: dfdaemon.v2.DownloadTaskStartedResponse.response_header:type_name -> dfdaemon.v2.DownloadTaskStartedResponse.ResponseHeaderEntry
|
||||
15, // 5: dfdaemon.v2.DownloadTaskStartedResponse.pieces:type_name -> common.v2.Piece
|
||||
15, // 6: dfdaemon.v2.DownloadPieceFinishedResponse.piece:type_name -> common.v2.Piece
|
||||
13, // 0: dfdaemon.v2.TriggerDownloadTaskRequest.download:type_name -> common.v2.Download
|
||||
14, // 1: dfdaemon.v2.DownloadPieceResponse.piece:type_name -> common.v2.Piece
|
||||
13, // 2: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download
|
||||
15, // 3: dfdaemon.v2.DownloadTaskStartedResponse.range:type_name -> common.v2.Range
|
||||
12, // 4: dfdaemon.v2.DownloadTaskStartedResponse.response_header:type_name -> dfdaemon.v2.DownloadTaskStartedResponse.ResponseHeaderEntry
|
||||
14, // 5: dfdaemon.v2.DownloadTaskStartedResponse.pieces:type_name -> common.v2.Piece
|
||||
14, // 6: dfdaemon.v2.DownloadPieceFinishedResponse.piece:type_name -> common.v2.Piece
|
||||
6, // 7: dfdaemon.v2.DownloadTaskResponse.download_task_started_response:type_name -> dfdaemon.v2.DownloadTaskStartedResponse
|
||||
7, // 8: dfdaemon.v2.DownloadTaskResponse.download_piece_finished_response:type_name -> dfdaemon.v2.DownloadPieceFinishedResponse
|
||||
17, // 9: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task
|
||||
16, // 9: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task
|
||||
0, // 10: dfdaemon.v2.DfdaemonUpload.TriggerDownloadTask:input_type -> dfdaemon.v2.TriggerDownloadTaskRequest
|
||||
1, // 11: dfdaemon.v2.DfdaemonUpload.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest
|
||||
3, // 12: dfdaemon.v2.DfdaemonUpload.DownloadPiece:input_type -> dfdaemon.v2.DownloadPieceRequest
|
||||
|
|
@ -1009,15 +955,15 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{
|
|||
9, // 14: dfdaemon.v2.DfdaemonDownload.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest
|
||||
10, // 15: dfdaemon.v2.DfdaemonDownload.StatTask:input_type -> dfdaemon.v2.StatTaskRequest
|
||||
11, // 16: dfdaemon.v2.DfdaemonDownload.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest
|
||||
12, // 17: dfdaemon.v2.DfdaemonDownload.LeaveHost:input_type -> dfdaemon.v2.LeaveHostRequest
|
||||
18, // 18: dfdaemon.v2.DfdaemonUpload.TriggerDownloadTask:output_type -> google.protobuf.Empty
|
||||
17, // 17: dfdaemon.v2.DfdaemonDownload.LeaveHost:input_type -> google.protobuf.Empty
|
||||
17, // 18: dfdaemon.v2.DfdaemonUpload.TriggerDownloadTask:output_type -> google.protobuf.Empty
|
||||
2, // 19: dfdaemon.v2.DfdaemonUpload.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse
|
||||
4, // 20: dfdaemon.v2.DfdaemonUpload.DownloadPiece:output_type -> dfdaemon.v2.DownloadPieceResponse
|
||||
8, // 21: dfdaemon.v2.DfdaemonDownload.DownloadTask:output_type -> dfdaemon.v2.DownloadTaskResponse
|
||||
18, // 22: dfdaemon.v2.DfdaemonDownload.UploadTask:output_type -> google.protobuf.Empty
|
||||
17, // 23: dfdaemon.v2.DfdaemonDownload.StatTask:output_type -> common.v2.Task
|
||||
18, // 24: dfdaemon.v2.DfdaemonDownload.DeleteTask:output_type -> google.protobuf.Empty
|
||||
18, // 25: dfdaemon.v2.DfdaemonDownload.LeaveHost:output_type -> google.protobuf.Empty
|
||||
17, // 22: dfdaemon.v2.DfdaemonDownload.UploadTask:output_type -> google.protobuf.Empty
|
||||
16, // 23: dfdaemon.v2.DfdaemonDownload.StatTask:output_type -> common.v2.Task
|
||||
17, // 24: dfdaemon.v2.DfdaemonDownload.DeleteTask:output_type -> google.protobuf.Empty
|
||||
17, // 25: dfdaemon.v2.DfdaemonDownload.LeaveHost:output_type -> google.protobuf.Empty
|
||||
18, // [18:26] is the sub-list for method output_type
|
||||
10, // [10:18] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
|
|
@ -1175,18 +1121,6 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LeaveHostRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[6].OneofWrappers = []interface{}{}
|
||||
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[8].OneofWrappers = []interface{}{
|
||||
|
|
@ -1199,7 +1133,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 14,
|
||||
NumMessages: 13,
|
||||
NumExtensions: 0,
|
||||
NumServices: 2,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1725,114 +1725,3 @@ var _ interface {
|
|||
Cause() error
|
||||
ErrorName() string
|
||||
} = DeleteTaskRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on LeaveHostRequest with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
func (m *LeaveHostRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on LeaveHostRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// LeaveHostRequestMultiError, or nil if none found.
|
||||
func (m *LeaveHostRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *LeaveHostRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if utf8.RuneCountInString(m.GetId()) < 1 {
|
||||
err := LeaveHostRequestValidationError{
|
||||
field: "Id",
|
||||
reason: "value length must be at least 1 runes",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return LeaveHostRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// LeaveHostRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by LeaveHostRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type LeaveHostRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m LeaveHostRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m LeaveHostRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// LeaveHostRequestValidationError is the validation error returned by
|
||||
// LeaveHostRequest.Validate if the designated constraints aren't met.
|
||||
type LeaveHostRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e LeaveHostRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e LeaveHostRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e LeaveHostRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e LeaveHostRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e LeaveHostRequestValidationError) ErrorName() string { return "LeaveHostRequestValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e LeaveHostRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sLeaveHostRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = LeaveHostRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = LeaveHostRequestValidationError{}
|
||||
|
|
|
|||
|
|
@ -138,12 +138,6 @@ message DeleteTaskRequest {
|
|||
string task_id = 1 [(validate.rules).string.min_len = 1];
|
||||
}
|
||||
|
||||
// LeaveHostRequest represents request of LeaveHost.
|
||||
message LeaveHostRequest{
|
||||
// Host id.
|
||||
string id = 1 [(validate.rules).string.min_len = 1];
|
||||
}
|
||||
|
||||
// DfdaemonDownload represents dfdaemon download service.
|
||||
service DfdaemonDownload {
|
||||
// DownloadTask downloads task back-to-source.
|
||||
|
|
@ -159,5 +153,5 @@ service DfdaemonDownload {
|
|||
rpc DeleteTask(DeleteTaskRequest) returns(google.protobuf.Empty);
|
||||
|
||||
// LeaveHost releases host in scheduler.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
rpc LeaveHost(google.protobuf.Empty)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ type DfdaemonDownloadClient interface {
|
|||
// DeleteTask deletes task from p2p network.
|
||||
DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// LeaveHost releases host in scheduler.
|
||||
LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type dfdaemonDownloadClient struct {
|
||||
|
|
@ -293,7 +293,7 @@ func (c *dfdaemonDownloadClient) DeleteTask(ctx context.Context, in *DeleteTaskR
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfdaemonDownloadClient) LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *dfdaemonDownloadClient) LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/dfdaemon.v2.DfdaemonDownload/LeaveHost", in, out, opts...)
|
||||
if err != nil {
|
||||
|
|
@ -315,7 +315,7 @@ type DfdaemonDownloadServer interface {
|
|||
// DeleteTask deletes task from p2p network.
|
||||
DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error)
|
||||
// LeaveHost releases host in scheduler.
|
||||
LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error)
|
||||
LeaveHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedDfdaemonDownloadServer should be embedded to have forward compatible implementations.
|
||||
|
|
@ -334,7 +334,7 @@ func (UnimplementedDfdaemonDownloadServer) StatTask(context.Context, *StatTaskRe
|
|||
func (UnimplementedDfdaemonDownloadServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented")
|
||||
}
|
||||
func (UnimplementedDfdaemonDownloadServer) LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error) {
|
||||
func (UnimplementedDfdaemonDownloadServer) LeaveHost(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LeaveHost not implemented")
|
||||
}
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ func _DfdaemonDownload_DeleteTask_Handler(srv interface{}, ctx context.Context,
|
|||
}
|
||||
|
||||
func _DfdaemonDownload_LeaveHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LeaveHostRequest)
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -437,7 +437,7 @@ func _DfdaemonDownload_LeaveHost_Handler(srv interface{}, ctx context.Context, d
|
|||
FullMethod: "/dfdaemon.v2.DfdaemonDownload/LeaveHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfdaemonDownloadServer).LeaveHost(ctx, req.(*LeaveHostRequest))
|
||||
return srv.(DfdaemonDownloadServer).LeaveHost(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ func (mr *MockDfdaemonDownloadClientMockRecorder) DownloadTask(ctx, in any, opts
|
|||
}
|
||||
|
||||
// LeaveHost mocks base method.
|
||||
func (m *MockDfdaemonDownloadClient) LeaveHost(ctx context.Context, in *dfdaemon.LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (m *MockDfdaemonDownloadClient) LeaveHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []any{ctx, in}
|
||||
for _, a := range opts {
|
||||
|
|
@ -746,7 +746,7 @@ func (mr *MockDfdaemonDownloadServerMockRecorder) DownloadTask(arg0, arg1 any) *
|
|||
}
|
||||
|
||||
// LeaveHost mocks base method.
|
||||
func (m *MockDfdaemonDownloadServer) LeaveHost(arg0 context.Context, arg1 *dfdaemon.LeaveHostRequest) (*emptypb.Empty, error) {
|
||||
func (m *MockDfdaemonDownloadServer) LeaveHost(arg0 context.Context, arg1 *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "LeaveHost", arg0, arg1)
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
|
|
|
|||
|
|
@ -133,12 +133,6 @@ message DeleteTaskRequest {
|
|||
string task_id = 1;
|
||||
}
|
||||
|
||||
// LeaveHostRequest represents request of LeaveHost.
|
||||
message LeaveHostRequest{
|
||||
// Host id.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// DfdaemonDownload represents download service of dfdaemon.
|
||||
service DfdaemonDownload{
|
||||
// DownloadTask downloads task back-to-source.
|
||||
|
|
@ -154,5 +148,5 @@ service DfdaemonDownload{
|
|||
rpc DeleteTask(DeleteTaskRequest) returns(google.protobuf.Empty);
|
||||
|
||||
// LeaveHost releases host in scheduler.
|
||||
rpc LeaveHost(LeaveHostRequest)returns(google.protobuf.Empty);
|
||||
rpc LeaveHost(google.protobuf.Empty)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -152,15 +152,6 @@ pub struct DeleteTaskRequest {
|
|||
#[prost(string, tag = "1")]
|
||||
pub task_id: ::prost::alloc::string::String,
|
||||
}
|
||||
/// LeaveHostRequest represents request of LeaveHost.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct LeaveHostRequest {
|
||||
/// Host id.
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Generated client implementations.
|
||||
pub mod dfdaemon_upload_client {
|
||||
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||
|
|
@ -513,7 +504,7 @@ pub mod dfdaemon_download_client {
|
|||
/// LeaveHost releases host in scheduler.
|
||||
pub async fn leave_host(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::LeaveHostRequest>,
|
||||
request: impl tonic::IntoRequest<()>,
|
||||
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
|
||||
self.inner
|
||||
.ready()
|
||||
|
|
@ -867,7 +858,7 @@ pub mod dfdaemon_download_server {
|
|||
/// LeaveHost releases host in scheduler.
|
||||
async fn leave_host(
|
||||
&self,
|
||||
request: tonic::Request<super::LeaveHostRequest>,
|
||||
request: tonic::Request<()>,
|
||||
) -> std::result::Result<tonic::Response<()>, tonic::Status>;
|
||||
}
|
||||
/// DfdaemonDownload represents download service of dfdaemon.
|
||||
|
|
@ -1132,19 +1123,14 @@ pub mod dfdaemon_download_server {
|
|||
"/dfdaemon.v2.DfdaemonDownload/LeaveHost" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct LeaveHostSvc<T: DfdaemonDownload>(pub Arc<T>);
|
||||
impl<
|
||||
T: DfdaemonDownload,
|
||||
> tonic::server::UnaryService<super::LeaveHostRequest>
|
||||
impl<T: DfdaemonDownload> tonic::server::UnaryService<()>
|
||||
for LeaveHostSvc<T> {
|
||||
type Response = ();
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::LeaveHostRequest>,
|
||||
) -> Self::Future {
|
||||
fn call(&mut self, request: tonic::Request<()>) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move { (*inner).leave_host(request).await };
|
||||
Box::pin(fut)
|
||||
|
|
|
|||
Loading…
Reference in New Issue