mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- add proto/services/sync_service.proto and generate Go pb + grpc bindings - implement SyncServiceServer (streaming file scan + download) with: - request deduplication, in-memory cache (TTL), chunked streaming - concurrent-safe broadcast to waiters and server-side logging - register SyncSvr in gRPC server and expose sync client in GrpcClient: - add syncClient field, registration and safe getters with reconnection-aware timeouts - integrate gRPC sync into runner: - split syncFiles into syncFilesHTTP (legacy) and syncFilesGRPC - Runner now chooses implementation via config flag and performs streaming scan/download - controller improvements: - add semaphore-based rate limiting for sync scan requests with in-flight counters and logs - misc: - add utils.IsSyncGrpcEnabled() config helper - improve HTTP sync error diagnostics (Content-Type validation, response previews) - update/regenerate many protobuf and gRPC generated files (protoc/protoc-gen-go / protoc-gen-go-grpc version bumps)
511 lines
19 KiB
Go
511 lines
19 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.1
|
|
// protoc v5.29.2
|
|
// source: services/sync_service.proto
|
|
|
|
package grpc
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// File synchronization request
|
|
type FileSyncRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
SpiderId string `protobuf:"bytes,1,opt,name=spider_id,json=spiderId,proto3" json:"spider_id,omitempty"` // or git_id
|
|
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // working directory path
|
|
NodeKey string `protobuf:"bytes,3,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"` // worker node key
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileSyncRequest) Reset() {
|
|
*x = FileSyncRequest{}
|
|
mi := &file_services_sync_service_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileSyncRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileSyncRequest) ProtoMessage() {}
|
|
|
|
func (x *FileSyncRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_services_sync_service_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileSyncRequest.ProtoReflect.Descriptor instead.
|
|
func (*FileSyncRequest) Descriptor() ([]byte, []int) {
|
|
return file_services_sync_service_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *FileSyncRequest) GetSpiderId() string {
|
|
if x != nil {
|
|
return x.SpiderId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileSyncRequest) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileSyncRequest) GetNodeKey() string {
|
|
if x != nil {
|
|
return x.NodeKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// File information message (streamable)
|
|
type FileInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
|
|
FullPath string `protobuf:"bytes,3,opt,name=full_path,json=fullPath,proto3" json:"full_path,omitempty"`
|
|
Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"`
|
|
IsDir bool `protobuf:"varint,5,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
|
|
FileSize int64 `protobuf:"varint,6,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
|
|
ModTime int64 `protobuf:"varint,7,opt,name=mod_time,json=modTime,proto3" json:"mod_time,omitempty"` // Unix timestamp
|
|
Mode uint32 `protobuf:"varint,8,opt,name=mode,proto3" json:"mode,omitempty"` // File permissions
|
|
Hash string `protobuf:"bytes,9,opt,name=hash,proto3" json:"hash,omitempty"` // File content hash
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileInfo) Reset() {
|
|
*x = FileInfo{}
|
|
mi := &file_services_sync_service_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileInfo) ProtoMessage() {}
|
|
|
|
func (x *FileInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_services_sync_service_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.
|
|
func (*FileInfo) Descriptor() ([]byte, []int) {
|
|
return file_services_sync_service_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *FileInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileInfo) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileInfo) GetFullPath() string {
|
|
if x != nil {
|
|
return x.FullPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileInfo) GetExtension() string {
|
|
if x != nil {
|
|
return x.Extension
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileInfo) GetIsDir() bool {
|
|
if x != nil {
|
|
return x.IsDir
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *FileInfo) GetFileSize() int64 {
|
|
if x != nil {
|
|
return x.FileSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FileInfo) GetModTime() int64 {
|
|
if x != nil {
|
|
return x.ModTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FileInfo) GetMode() uint32 {
|
|
if x != nil {
|
|
return x.Mode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FileInfo) GetHash() string {
|
|
if x != nil {
|
|
return x.Hash
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Stream response for file scan
|
|
type FileScanChunk struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Files []*FileInfo `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // Batch of files
|
|
IsComplete bool `protobuf:"varint,2,opt,name=is_complete,json=isComplete,proto3" json:"is_complete,omitempty"` // Last chunk indicator
|
|
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Error message if any
|
|
TotalFiles int32 `protobuf:"varint,4,opt,name=total_files,json=totalFiles,proto3" json:"total_files,omitempty"` // Total file count (in last chunk)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileScanChunk) Reset() {
|
|
*x = FileScanChunk{}
|
|
mi := &file_services_sync_service_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileScanChunk) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileScanChunk) ProtoMessage() {}
|
|
|
|
func (x *FileScanChunk) ProtoReflect() protoreflect.Message {
|
|
mi := &file_services_sync_service_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileScanChunk.ProtoReflect.Descriptor instead.
|
|
func (*FileScanChunk) Descriptor() ([]byte, []int) {
|
|
return file_services_sync_service_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *FileScanChunk) GetFiles() []*FileInfo {
|
|
if x != nil {
|
|
return x.Files
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileScanChunk) GetIsComplete() bool {
|
|
if x != nil {
|
|
return x.IsComplete
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *FileScanChunk) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileScanChunk) GetTotalFiles() int32 {
|
|
if x != nil {
|
|
return x.TotalFiles
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// Download request
|
|
type FileDownloadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
SpiderId string `protobuf:"bytes,1,opt,name=spider_id,json=spiderId,proto3" json:"spider_id,omitempty"`
|
|
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
|
|
NodeKey string `protobuf:"bytes,3,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileDownloadRequest) Reset() {
|
|
*x = FileDownloadRequest{}
|
|
mi := &file_services_sync_service_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileDownloadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileDownloadRequest) ProtoMessage() {}
|
|
|
|
func (x *FileDownloadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_services_sync_service_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileDownloadRequest.ProtoReflect.Descriptor instead.
|
|
func (*FileDownloadRequest) Descriptor() ([]byte, []int) {
|
|
return file_services_sync_service_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *FileDownloadRequest) GetSpiderId() string {
|
|
if x != nil {
|
|
return x.SpiderId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileDownloadRequest) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileDownloadRequest) GetNodeKey() string {
|
|
if x != nil {
|
|
return x.NodeKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Download response (streamed in chunks)
|
|
type FileDownloadChunk struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // File data chunk
|
|
IsComplete bool `protobuf:"varint,2,opt,name=is_complete,json=isComplete,proto3" json:"is_complete,omitempty"` // Last chunk indicator
|
|
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Error if any
|
|
TotalBytes int64 `protobuf:"varint,4,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` // Total file size (in first chunk)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileDownloadChunk) Reset() {
|
|
*x = FileDownloadChunk{}
|
|
mi := &file_services_sync_service_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileDownloadChunk) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileDownloadChunk) ProtoMessage() {}
|
|
|
|
func (x *FileDownloadChunk) ProtoReflect() protoreflect.Message {
|
|
mi := &file_services_sync_service_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileDownloadChunk.ProtoReflect.Descriptor instead.
|
|
func (*FileDownloadChunk) Descriptor() ([]byte, []int) {
|
|
return file_services_sync_service_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *FileDownloadChunk) GetData() []byte {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *FileDownloadChunk) GetIsComplete() bool {
|
|
if x != nil {
|
|
return x.IsComplete
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *FileDownloadChunk) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileDownloadChunk) GetTotalBytes() int64 {
|
|
if x != nil {
|
|
return x.TotalBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_services_sync_service_proto protoreflect.FileDescriptor
|
|
|
|
var file_services_sync_service_proto_rawDesc = []byte{
|
|
0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f,
|
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,
|
|
0x72, 0x70, 0x63, 0x22, 0x5d, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x52,
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72,
|
|
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x70, 0x69, 0x64, 0x65,
|
|
0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
|
|
0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b,
|
|
0x65, 0x79, 0x22, 0xe4, 0x01, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
|
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
|
0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f,
|
|
0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c,
|
|
0x50, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
|
0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
|
|
0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01,
|
|
0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c,
|
|
0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69,
|
|
0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x5f, 0x74, 0x69,
|
|
0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d,
|
|
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
|
0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x09, 0x20,
|
|
0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x8d, 0x01, 0x0a, 0x0d, 0x46, 0x69,
|
|
0x6c, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x24, 0x0a, 0x05, 0x66,
|
|
0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x72, 0x70,
|
|
0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65,
|
|
0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
|
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
|
|
0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61,
|
|
0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74,
|
|
0x6f, 0x74, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x61, 0x0a, 0x13, 0x46, 0x69, 0x6c,
|
|
0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
0x12, 0x1b, 0x0a, 0x09, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a,
|
|
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
|
|
0x68, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20,
|
|
0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x7f, 0x0a, 0x11,
|
|
0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x68, 0x75, 0x6e,
|
|
0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
|
0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70,
|
|
0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x6f,
|
|
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
|
|
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b,
|
|
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
|
|
0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x32, 0x99, 0x01,
|
|
0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
|
|
0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x12,
|
|
0x15, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x52,
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69,
|
|
0x6c, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x30, 0x01, 0x12, 0x4a, 0x0a,
|
|
0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
|
|
0x6f, 0x61, 0x64, 0x12, 0x19, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44,
|
|
0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17,
|
|
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
|
0x61, 0x64, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67,
|
|
0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_services_sync_service_proto_rawDescOnce sync.Once
|
|
file_services_sync_service_proto_rawDescData = file_services_sync_service_proto_rawDesc
|
|
)
|
|
|
|
func file_services_sync_service_proto_rawDescGZIP() []byte {
|
|
file_services_sync_service_proto_rawDescOnce.Do(func() {
|
|
file_services_sync_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_sync_service_proto_rawDescData)
|
|
})
|
|
return file_services_sync_service_proto_rawDescData
|
|
}
|
|
|
|
var file_services_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_services_sync_service_proto_goTypes = []any{
|
|
(*FileSyncRequest)(nil), // 0: grpc.FileSyncRequest
|
|
(*FileInfo)(nil), // 1: grpc.FileInfo
|
|
(*FileScanChunk)(nil), // 2: grpc.FileScanChunk
|
|
(*FileDownloadRequest)(nil), // 3: grpc.FileDownloadRequest
|
|
(*FileDownloadChunk)(nil), // 4: grpc.FileDownloadChunk
|
|
}
|
|
var file_services_sync_service_proto_depIdxs = []int32{
|
|
1, // 0: grpc.FileScanChunk.files:type_name -> grpc.FileInfo
|
|
0, // 1: grpc.SyncService.StreamFileScan:input_type -> grpc.FileSyncRequest
|
|
3, // 2: grpc.SyncService.StreamFileDownload:input_type -> grpc.FileDownloadRequest
|
|
2, // 3: grpc.SyncService.StreamFileScan:output_type -> grpc.FileScanChunk
|
|
4, // 4: grpc.SyncService.StreamFileDownload:output_type -> grpc.FileDownloadChunk
|
|
3, // [3:5] is the sub-list for method output_type
|
|
1, // [1:3] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_services_sync_service_proto_init() }
|
|
func file_services_sync_service_proto_init() {
|
|
if File_services_sync_service_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_services_sync_service_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_services_sync_service_proto_goTypes,
|
|
DependencyIndexes: file_services_sync_service_proto_depIdxs,
|
|
MessageInfos: file_services_sync_service_proto_msgTypes,
|
|
}.Build()
|
|
File_services_sync_service_proto = out.File
|
|
file_services_sync_service_proto_rawDesc = nil
|
|
file_services_sync_service_proto_goTypes = nil
|
|
file_services_sync_service_proto_depIdxs = nil
|
|
}
|