@ -7,10 +7,6 @@
package downloader
package downloader
import (
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
reflect "reflect"
@ -35,6 +31,7 @@ const (
DownloaderRequest_REGISTERTIMEOUT DownloaderRequest_RequestType = 5
DownloaderRequest_REGISTERTIMEOUT DownloaderRequest_RequestType = 5
DownloaderRequest_UNKNOWN DownloaderRequest_RequestType = 6
DownloaderRequest_UNKNOWN DownloaderRequest_RequestType = 6
DownloaderRequest_BLOCKHEADER DownloaderRequest_RequestType = 7
DownloaderRequest_BLOCKHEADER DownloaderRequest_RequestType = 7
DownloaderRequest_BLOCKBYHEIGHT DownloaderRequest_RequestType = 8
)
)
// Enum value maps for DownloaderRequest_RequestType.
// Enum value maps for DownloaderRequest_RequestType.
@ -48,6 +45,7 @@ var (
5 : "REGISTERTIMEOUT" ,
5 : "REGISTERTIMEOUT" ,
6 : "UNKNOWN" ,
6 : "UNKNOWN" ,
7 : "BLOCKHEADER" ,
7 : "BLOCKHEADER" ,
8 : "BLOCKBYHEIGHT" ,
}
}
DownloaderRequest_RequestType_value = map [ string ] int32 {
DownloaderRequest_RequestType_value = map [ string ] int32 {
"BLOCKHASH" : 0 ,
"BLOCKHASH" : 0 ,
@ -58,6 +56,7 @@ var (
"REGISTERTIMEOUT" : 5 ,
"REGISTERTIMEOUT" : 5 ,
"UNKNOWN" : 6 ,
"UNKNOWN" : 6 ,
"BLOCKHEADER" : 7 ,
"BLOCKHEADER" : 7 ,
"BLOCKBYHEIGHT" : 8 ,
}
}
)
)
@ -154,6 +153,7 @@ type DownloaderRequest struct {
Size uint32 ` protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty" `
Size uint32 ` protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty" `
RegisterWithSig bool ` protobuf:"varint,8,opt,name=registerWithSig,proto3" json:"registerWithSig,omitempty" ` // Expect to have NEWBLOCK response of block along with current signature
RegisterWithSig bool ` protobuf:"varint,8,opt,name=registerWithSig,proto3" json:"registerWithSig,omitempty" ` // Expect to have NEWBLOCK response of block along with current signature
GetBlocksWithSig bool ` protobuf:"varint,9,opt,name=getBlocksWithSig,proto3" json:"getBlocksWithSig,omitempty" ` // Have block along with signature for BLOCK request.
GetBlocksWithSig bool ` protobuf:"varint,9,opt,name=getBlocksWithSig,proto3" json:"getBlocksWithSig,omitempty" ` // Have block along with signature for BLOCK request.
Heights [ ] uint64 ` protobuf:"varint,10,rep,packed,name=heights,proto3" json:"heights,omitempty" `
}
}
func ( x * DownloaderRequest ) Reset ( ) {
func ( x * DownloaderRequest ) Reset ( ) {
@ -251,6 +251,13 @@ func (x *DownloaderRequest) GetGetBlocksWithSig() bool {
return false
return false
}
}
func ( x * DownloaderRequest ) GetHeights ( ) [ ] uint64 {
if x != nil {
return x . Heights
}
return nil
}
// DownloaderResponse is the generic response of DownloaderRequest.
// DownloaderResponse is the generic response of DownloaderRequest.
type DownloaderResponse struct {
type DownloaderResponse struct {
state protoimpl . MessageState
state protoimpl . MessageState
@ -321,7 +328,7 @@ var File_downloader_proto protoreflect.FileDescriptor
var file_downloader_proto_rawDesc = [ ] byte {
var file_downloader_proto_rawDesc = [ ] byte {
0x0a , 0x10 , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x70 , 0x72 , 0x6f ,
0x0a , 0x10 , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x70 , 0x72 , 0x6f ,
0x74 , 0x6f , 0x12 , 0x0a , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x22 , 0xbc ,
0x74 , 0x6f , 0x12 , 0x0a , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x22 , 0xe9 ,
0x03 , 0x0a , 0x11 , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x71 ,
0x03 , 0x0a , 0x11 , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x71 ,
0x75 , 0x65 , 0x73 , 0x74 , 0x12 , 0x3d , 0x0a , 0x04 , 0x74 , 0x79 , 0x70 , 0x65 , 0x18 , 0x01 , 0x20 , 0x01 ,
0x75 , 0x65 , 0x73 , 0x74 , 0x12 , 0x3d , 0x0a , 0x04 , 0x74 , 0x79 , 0x70 , 0x65 , 0x18 , 0x01 , 0x20 , 0x01 ,
0x28 , 0x0e , 0x32 , 0x29 , 0x2e , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e ,
0x28 , 0x0e , 0x32 , 0x29 , 0x2e , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e ,
@ -341,36 +348,39 @@ var file_downloader_proto_rawDesc = []byte{
0x57 , 0x69 , 0x74 , 0x68 , 0x53 , 0x69 , 0x67 , 0x12 , 0x2a , 0x0a , 0x10 , 0x67 , 0x65 , 0x74 , 0x42 , 0x6c ,
0x57 , 0x69 , 0x74 , 0x68 , 0x53 , 0x69 , 0x67 , 0x12 , 0x2a , 0x0a , 0x10 , 0x67 , 0x65 , 0x74 , 0x42 , 0x6c ,
0x6f , 0x63 , 0x6b , 0x73 , 0x57 , 0x69 , 0x74 , 0x68 , 0x53 , 0x69 , 0x67 , 0x18 , 0x09 , 0x20 , 0x01 , 0x28 ,
0x6f , 0x63 , 0x6b , 0x73 , 0x57 , 0x69 , 0x74 , 0x68 , 0x53 , 0x69 , 0x67 , 0x18 , 0x09 , 0x20 , 0x01 , 0x28 ,
0x08 , 0x52 , 0x10 , 0x67 , 0x65 , 0x74 , 0x42 , 0x6c , 0x6f , 0x63 , 0x6b , 0x73 , 0x57 , 0x69 , 0x74 , 0x68 ,
0x08 , 0x52 , 0x10 , 0x67 , 0x65 , 0x74 , 0x42 , 0x6c , 0x6f , 0x63 , 0x6b , 0x73 , 0x57 , 0x69 , 0x74 , 0x68 ,
0x53 , 0x69 , 0x67 , 0x22 , 0x87 , 0x01 , 0x0a , 0x0b , 0x52 , 0x65 , 0x71 , 0x75 , 0x65 , 0x73 , 0x74 , 0x54 ,
0x53 , 0x69 , 0x67 , 0x12 , 0x18 , 0x0a , 0x07 , 0x68 , 0x65 , 0x69 , 0x67 , 0x68 , 0x74 , 0x73 , 0x18 , 0x0a ,
0x79 , 0x70 , 0x65 , 0x12 , 0x0d , 0x0a , 0x09 , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x48 , 0x41 , 0x53 , 0x48 ,
0x20 , 0x03 , 0x28 , 0x04 , 0x52 , 0x07 , 0x68 , 0x65 , 0x69 , 0x67 , 0x68 , 0x74 , 0x73 , 0x22 , 0x9a , 0x01 ,
0x10 , 0x00 , 0x12 , 0x09 , 0x0a , 0x05 , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x10 , 0x01 , 0x12 , 0x0c , 0x0a ,
0x0a , 0x0b , 0x52 , 0x65 , 0x71 , 0x75 , 0x65 , 0x73 , 0x74 , 0x54 , 0x79 , 0x70 , 0x65 , 0x12 , 0x0d , 0x0a ,
0x08 , 0x4e , 0x45 , 0x57 , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x10 , 0x02 , 0x12 , 0x0f , 0x0a , 0x0b , 0x42 ,
0x09 , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x48 , 0x41 , 0x53 , 0x48 , 0x10 , 0x00 , 0x12 , 0x09 , 0x0a , 0x05 ,
0x4c , 0x4f , 0x43 , 0x4b , 0x48 , 0x45 , 0x49 , 0x47 , 0x48 , 0x54 , 0x10 , 0x03 , 0x12 , 0x0c , 0x0a , 0x08 ,
0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x10 , 0x01 , 0x12 , 0x0c , 0x0a , 0x08 , 0x4e , 0x45 , 0x57 , 0x42 , 0x4c ,
0x52 , 0x45 , 0x47 , 0x49 , 0x53 , 0x54 , 0x45 , 0x52 , 0x10 , 0x04 , 0x12 , 0x13 , 0x0a , 0x0f , 0x52 , 0x45 ,
0x4f , 0x43 , 0x4b , 0x10 , 0x02 , 0x12 , 0x0f , 0x0a , 0x0b , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x48 , 0x45 ,
0x47 , 0x49 , 0x53 , 0x54 , 0x45 , 0x52 , 0x54 , 0x49 , 0x4d , 0x45 , 0x4f , 0x55 , 0x54 , 0x10 , 0x05 , 0x12 ,
0x49 , 0x47 , 0x48 , 0x54 , 0x10 , 0x03 , 0x12 , 0x0c , 0x0a , 0x08 , 0x52 , 0x45 , 0x47 , 0x49 , 0x53 , 0x54 ,
0x0b , 0x0a , 0x07 , 0x55 , 0x4e , 0x4b , 0x4e , 0x4f , 0x57 , 0x4e , 0x10 , 0x06 , 0x12 , 0x0f , 0x0a , 0x0b ,
0x45 , 0x52 , 0x10 , 0x04 , 0x12 , 0x13 , 0x0a , 0x0f , 0x52 , 0x45 , 0x47 , 0x49 , 0x53 , 0x54 , 0x45 , 0x52 ,
0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x48 , 0x45 , 0x41 , 0x44 , 0x45 , 0x52 , 0x10 , 0x07 , 0x22 , 0xd4 , 0x01 ,
0x54 , 0x49 , 0x4d , 0x45 , 0x4f , 0x55 , 0x54 , 0x10 , 0x05 , 0x12 , 0x0b , 0x0a , 0x07 , 0x55 , 0x4e , 0x4b ,
0x0a , 0x12 , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 ,
0x4e , 0x4f , 0x57 , 0x4e , 0x10 , 0x06 , 0x12 , 0x0f , 0x0a , 0x0b , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b , 0x48 ,
0x6f , 0x6e , 0x73 , 0x65 , 0x12 , 0x18 , 0x0a , 0x07 , 0x70 , 0x61 , 0x79 , 0x6c , 0x6f , 0x61 , 0x64 , 0x18 ,
0x45 , 0x41 , 0x44 , 0x45 , 0x52 , 0x10 , 0x07 , 0x12 , 0x11 , 0x0a , 0x0d , 0x42 , 0x4c , 0x4f , 0x43 , 0x4b ,
0x01 , 0x20 , 0x03 , 0x28 , 0x0c , 0x52 , 0x07 , 0x70 , 0x61 , 0x79 , 0x6c , 0x6f , 0x61 , 0x64 , 0x12 , 0x47 ,
0x42 , 0x59 , 0x48 , 0x45 , 0x49 , 0x47 , 0x48 , 0x54 , 0x10 , 0x08 , 0x22 , 0xd4 , 0x01 , 0x0a , 0x12 , 0x44 ,
0x0a , 0x04 , 0x74 , 0x79 , 0x70 , 0x65 , 0x18 , 0x02 , 0x20 , 0x01 , 0x28 , 0x0e , 0x32 , 0x33 , 0x2e , 0x64 ,
0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 ,
0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f ,
0x65 , 0x12 , 0x18 , 0x0a , 0x07 , 0x70 , 0x61 , 0x79 , 0x6c , 0x6f , 0x61 , 0x64 , 0x18 , 0x01 , 0x20 , 0x03 ,
0x61 , 0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x2e , 0x52 , 0x65 , 0x67 ,
0x28 , 0x0c , 0x52 , 0x07 , 0x70 , 0x61 , 0x79 , 0x6c , 0x6f , 0x61 , 0x64 , 0x12 , 0x47 , 0x0a , 0x04 , 0x74 ,
0x69 , 0x73 , 0x74 , 0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x54 , 0x79 , 0x70 ,
0x79 , 0x70 , 0x65 , 0x18 , 0x02 , 0x20 , 0x01 , 0x28 , 0x0e , 0x32 , 0x33 , 0x2e , 0x64 , 0x6f , 0x77 , 0x6e ,
0x65 , 0x52 , 0x04 , 0x74 , 0x79 , 0x70 , 0x65 , 0x12 , 0x20 , 0x0a , 0x0b , 0x62 , 0x6c , 0x6f , 0x63 , 0x6b ,
0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 ,
0x48 , 0x65 , 0x69 , 0x67 , 0x68 , 0x74 , 0x18 , 0x03 , 0x20 , 0x01 , 0x28 , 0x04 , 0x52 , 0x0b , 0x62 , 0x6c ,
0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x2e , 0x52 , 0x65 , 0x67 , 0x69 , 0x73 , 0x74 ,
0x6f , 0x63 , 0x6b , 0x48 , 0x65 , 0x69 , 0x67 , 0x68 , 0x74 , 0x22 , 0x39 , 0x0a , 0x14 , 0x52 , 0x65 , 0x67 ,
0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x54 , 0x79 , 0x70 , 0x65 , 0x52 , 0x04 ,
0x69 , 0x73 , 0x74 , 0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x54 , 0x79 , 0x70 ,
0x74 , 0x79 , 0x70 , 0x65 , 0x12 , 0x20 , 0x0a , 0x0b , 0x62 , 0x6c , 0x6f , 0x63 , 0x6b , 0x48 , 0x65 , 0x69 ,
0x65 , 0x12 , 0x0b , 0x0a , 0x07 , 0x53 , 0x55 , 0x43 , 0x43 , 0x45 , 0x53 , 0x53 , 0x10 , 0x00 , 0x12 , 0x08 ,
0x67 , 0x68 , 0x74 , 0x18 , 0x03 , 0x20 , 0x01 , 0x28 , 0x04 , 0x52 , 0x0b , 0x62 , 0x6c , 0x6f , 0x63 , 0x6b ,
0x0a , 0x04 , 0x46 , 0x41 , 0x49 , 0x4c , 0x10 , 0x01 , 0x12 , 0x0a , 0x0a , 0x06 , 0x49 , 0x4e , 0x53 , 0x59 ,
0x48 , 0x65 , 0x69 , 0x67 , 0x68 , 0x74 , 0x22 , 0x39 , 0x0a , 0x14 , 0x52 , 0x65 , 0x67 , 0x69 , 0x73 , 0x74 ,
0x4e , 0x43 , 0x10 , 0x02 , 0x32 , 0x56 , 0x0a , 0x0a , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 ,
0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x54 , 0x79 , 0x70 , 0x65 , 0x12 , 0x0b ,
0x65 , 0x72 , 0x12 , 0x48 , 0x0a , 0x05 , 0x51 , 0x75 , 0x65 , 0x72 , 0x79 , 0x12 , 0x1d , 0x2e , 0x64 , 0x6f ,
0x0a , 0x07 , 0x53 , 0x55 , 0x43 , 0x43 , 0x45 , 0x53 , 0x53 , 0x10 , 0x00 , 0x12 , 0x08 , 0x0a , 0x04 , 0x46 ,
0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 ,
0x41 , 0x49 , 0x4c , 0x10 , 0x01 , 0x12 , 0x0a , 0x0a , 0x06 , 0x49 , 0x4e , 0x53 , 0x59 , 0x4e , 0x43 , 0x10 ,
0x64 , 0x65 , 0x72 , 0x52 , 0x65 , 0x71 , 0x75 , 0x65 , 0x73 , 0x74 , 0x1a , 0x1e , 0x2e , 0x64 , 0x6f , 0x77 ,
0x02 , 0x32 , 0x56 , 0x0a , 0x0a , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x12 ,
0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 ,
0x48 , 0x0a , 0x05 , 0x51 , 0x75 , 0x65 , 0x72 , 0x79 , 0x12 , 0x1d , 0x2e , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c ,
0x65 , 0x72 , 0x52 , 0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x22 , 0x00 , 0x42 , 0x0f , 0x5a , 0x0d ,
0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 ,
0x2e , 0x2f , 0x3b , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x62 , 0x06 , 0x70 ,
0x52 , 0x65 , 0x71 , 0x75 , 0x65 , 0x73 , 0x74 , 0x1a , 0x1e , 0x2e , 0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f ,
0x72 , 0x6f , 0x74 , 0x6f , 0x33 ,
0x61 , 0x64 , 0x65 , 0x72 , 0x2e , 0x44 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x52 ,
0x65 , 0x73 , 0x70 , 0x6f , 0x6e , 0x73 , 0x65 , 0x22 , 0x00 , 0x42 , 0x0f , 0x5a , 0x0d , 0x2e , 0x2f , 0x3b ,
0x64 , 0x6f , 0x77 , 0x6e , 0x6c , 0x6f , 0x61 , 0x64 , 0x65 , 0x72 , 0x62 , 0x06 , 0x70 , 0x72 , 0x6f , 0x74 ,
0x6f , 0x33 ,
}
}
var (
var (
@ -456,83 +466,3 @@ func file_downloader_proto_init() {
file_downloader_proto_goTypes = nil
file_downloader_proto_goTypes = nil
file_downloader_proto_depIdxs = nil
file_downloader_proto_depIdxs = nil
}
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context . Context
var _ grpc . ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc . SupportPackageIsVersion6
// DownloaderClient is the client API for Downloader service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DownloaderClient interface {
Query ( ctx context . Context , in * DownloaderRequest , opts ... grpc . CallOption ) ( * DownloaderResponse , error )
}
type downloaderClient struct {
cc grpc . ClientConnInterface
}
func NewDownloaderClient ( cc grpc . ClientConnInterface ) DownloaderClient {
return & downloaderClient { cc }
}
func ( c * downloaderClient ) Query ( ctx context . Context , in * DownloaderRequest , opts ... grpc . CallOption ) ( * DownloaderResponse , error ) {
out := new ( DownloaderResponse )
err := c . cc . Invoke ( ctx , "/downloader.Downloader/Query" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// DownloaderServer is the server API for Downloader service.
type DownloaderServer interface {
Query ( context . Context , * DownloaderRequest ) ( * DownloaderResponse , error )
}
// UnimplementedDownloaderServer can be embedded to have forward compatible implementations.
type UnimplementedDownloaderServer struct {
}
func ( * UnimplementedDownloaderServer ) Query ( context . Context , * DownloaderRequest ) ( * DownloaderResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Query not implemented" )
}
func RegisterDownloaderServer ( s * grpc . Server , srv DownloaderServer ) {
s . RegisterService ( & _Downloader_serviceDesc , srv )
}
func _Downloader_Query_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DownloaderRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DownloaderServer ) . Query ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/downloader.Downloader/Query" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DownloaderServer ) . Query ( ctx , req . ( * DownloaderRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
var _Downloader_serviceDesc = grpc . ServiceDesc {
ServiceName : "downloader.Downloader" ,
HandlerType : ( * DownloaderServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Query" ,
Handler : _Downloader_Query_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "downloader.proto" ,
}