mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: unable to sync directories to work nodes
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -19,6 +20,132 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type NodeServiceRegisterRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsMaster bool `protobuf:"varint,3,opt,name=isMaster,proto3" json:"isMaster,omitempty"`
|
||||
AuthKey string `protobuf:"bytes,4,opt,name=authKey,proto3" json:"authKey,omitempty"`
|
||||
MaxRunners int32 `protobuf:"varint,5,opt,name=maxRunners,proto3" json:"maxRunners,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) Reset() {
|
||||
*x = NodeServiceRegisterRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_services_node_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NodeServiceRegisterRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_services_node_service_proto_msgTypes[0]
|
||||
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 NodeServiceRegisterRequest.ProtoReflect.Descriptor instead.
|
||||
func (*NodeServiceRegisterRequest) Descriptor() ([]byte, []int) {
|
||||
return file_services_node_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetIsMaster() bool {
|
||||
if x != nil {
|
||||
return x.IsMaster
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetAuthKey() string {
|
||||
if x != nil {
|
||||
return x.AuthKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeServiceRegisterRequest) GetMaxRunners() int32 {
|
||||
if x != nil {
|
||||
return x.MaxRunners
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type NodeServiceSendHeartbeatRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) Reset() {
|
||||
*x = NodeServiceSendHeartbeatRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_services_node_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NodeServiceSendHeartbeatRequest) ProtoMessage() {}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_services_node_service_proto_msgTypes[1]
|
||||
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 NodeServiceSendHeartbeatRequest.ProtoReflect.Descriptor instead.
|
||||
func (*NodeServiceSendHeartbeatRequest) Descriptor() ([]byte, []int) {
|
||||
return file_services_node_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *NodeServiceSendHeartbeatRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_services_node_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_services_node_service_proto_rawDesc = []byte{
|
||||
@@ -28,44 +155,70 @@ var file_services_node_service_proto_rawDesc = []byte{
|
||||
0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,
|
||||
0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xfa, 0x01,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x0d, 0x53, 0x65,
|
||||
0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01,
|
||||
0x0a, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67,
|
||||
0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52,
|
||||
0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61,
|
||||
0x78, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x33, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xfc, 0x01,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,
|
||||
0x0d, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x25,
|
||||
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63,
|
||||
0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
|
||||
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b,
|
||||
0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x04,
|
||||
0x50, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||
0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b, 0x55, 0x6e,
|
||||
0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,
|
||||
0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06,
|
||||
0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_services_node_service_proto_rawDescOnce sync.Once
|
||||
file_services_node_service_proto_rawDescData = file_services_node_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_services_node_service_proto_rawDescGZIP() []byte {
|
||||
file_services_node_service_proto_rawDescOnce.Do(func() {
|
||||
file_services_node_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_node_service_proto_rawDescData)
|
||||
})
|
||||
return file_services_node_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_services_node_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_services_node_service_proto_goTypes = []any{
|
||||
(*Request)(nil), // 0: grpc.Request
|
||||
(*Response)(nil), // 1: grpc.Response
|
||||
(*StreamMessage)(nil), // 2: grpc.StreamMessage
|
||||
(*NodeServiceRegisterRequest)(nil), // 0: grpc.NodeServiceRegisterRequest
|
||||
(*NodeServiceSendHeartbeatRequest)(nil), // 1: grpc.NodeServiceSendHeartbeatRequest
|
||||
(*Request)(nil), // 2: grpc.Request
|
||||
(*Response)(nil), // 3: grpc.Response
|
||||
(*StreamMessage)(nil), // 4: grpc.StreamMessage
|
||||
}
|
||||
var file_services_node_service_proto_depIdxs = []int32{
|
||||
0, // 0: grpc.NodeService.Register:input_type -> grpc.Request
|
||||
0, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.Request
|
||||
0, // 2: grpc.NodeService.Ping:input_type -> grpc.Request
|
||||
0, // 3: grpc.NodeService.Subscribe:input_type -> grpc.Request
|
||||
0, // 4: grpc.NodeService.Unsubscribe:input_type -> grpc.Request
|
||||
1, // 5: grpc.NodeService.Register:output_type -> grpc.Response
|
||||
1, // 6: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
|
||||
1, // 7: grpc.NodeService.Ping:output_type -> grpc.Response
|
||||
2, // 8: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage
|
||||
1, // 9: grpc.NodeService.Unsubscribe:output_type -> grpc.Response
|
||||
5, // [5:10] is the sub-list for method output_type
|
||||
0, // [0:5] is the sub-list for method input_type
|
||||
0, // 0: grpc.NodeService.Register:input_type -> grpc.NodeServiceRegisterRequest
|
||||
1, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.NodeServiceSendHeartbeatRequest
|
||||
2, // 2: grpc.NodeService.Subscribe:input_type -> grpc.Request
|
||||
2, // 3: grpc.NodeService.Unsubscribe:input_type -> grpc.Request
|
||||
3, // 4: grpc.NodeService.Register:output_type -> grpc.Response
|
||||
3, // 5: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
|
||||
4, // 6: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage
|
||||
3, // 7: grpc.NodeService.Unsubscribe:output_type -> grpc.Response
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
@@ -79,18 +232,45 @@ func file_services_node_service_proto_init() {
|
||||
file_entity_request_proto_init()
|
||||
file_entity_response_proto_init()
|
||||
file_entity_stream_message_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_services_node_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*NodeServiceRegisterRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_services_node_service_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*NodeServiceSendHeartbeatRequest); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_services_node_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_services_node_service_proto_goTypes,
|
||||
DependencyIndexes: file_services_node_service_proto_depIdxs,
|
||||
MessageInfos: file_services_node_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_services_node_service_proto = out.File
|
||||
file_services_node_service_proto_rawDesc = nil
|
||||
|
||||
Reference in New Issue
Block a user