From 8adefac6a6ec3e53299581d7b2b1b9c7aa7005e8 Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 19 Jul 2021 15:10:31 +0800 Subject: [PATCH 1/2] feat: register Signed-off-by: Gaius --- cdnsystem/server/server.go | 24 +- manager/service/service_grpc.go | 57 +- pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go | 10 +- pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go | 10 +- pkg/rpc/manager/manager.pb.go | 703 ++++++++----------------- pkg/rpc/manager/manager.pb.validate.go | 377 +------------ pkg/rpc/manager/manager.proto | 35 +- pkg/rpc/manager/manager_grpc.pb.go | 86 +-- pkg/rpc/scheduler/scheduler_grpc.pb.go | 10 +- scheduler/server/server.go | 21 +- 10 files changed, 308 insertions(+), 1025 deletions(-) diff --git a/cdnsystem/server/server.go b/cdnsystem/server/server.go index 34705275d0a..7b7011f42f1 100644 --- a/cdnsystem/server/server.go +++ b/cdnsystem/server/server.go @@ -164,9 +164,7 @@ func (s *Server) register(ctx context.Context) error { location := s.config.Host.Location downloadPort := int32(s.config.DownloadPort) - var cdn *manager.CDN - var err error - cdn, err = s.managerClient.CreateCDN(ctx, &manager.CreateCDNRequest{ + cdn, err := s.managerClient.UpdateCDN(ctx, &manager.UpdateCDNRequest{ SourceType: manager.SourceType_CDN_SOURCE, HostName: iputils.HostName, Ip: ip, @@ -176,22 +174,10 @@ func (s *Server) register(ctx context.Context) error { DownloadPort: downloadPort, }) if err != nil { - cdn, err = s.managerClient.UpdateCDN(ctx, &manager.UpdateCDNRequest{ - SourceType: manager.SourceType_CDN_SOURCE, - HostName: iputils.HostName, - Ip: ip, - Port: port, - Idc: idc, - Location: location, - DownloadPort: downloadPort, - }) - if err != nil { - logger.Errorf("update cdn to manager failed %v", err) - return err - } - logger.Infof("update cdn %s successfully", cdn.HostName) + logger.Errorf("update cdn %s to manager failed %v", cdn.HostName, err) + return err } - logger.Infof("create cdn %s successfully", cdn.HostName) + logger.Infof("update cdn %s to manager successfully", cdn.HostName) cdnClusterID := s.config.Manager.CDNClusterID if cdnClusterID != 0 { @@ -199,7 +185,7 @@ func (s *Server) register(ctx context.Context) error { CdnId: cdn.Id, CdnClusterId: cdnClusterID, }); err != nil { - logger.Warnf("add cdn to cdn cluster failed %v", err) + logger.Warnf("add cdn %s to cdn cluster %s failed %v", cdn.HostName, cdnClusterID, err) return err } logger.Infof("add cdn %s to cdn cluster %s successfully", cdn.HostName, cdnClusterID) diff --git a/manager/service/service_grpc.go b/manager/service/service_grpc.go index f2050424886..8dda42cf687 100644 --- a/manager/service/service_grpc.go +++ b/manager/service/service_grpc.go @@ -2,6 +2,7 @@ package service import ( "context" + "errors" "io" logger "d7y.io/dragonfly/v2/internal/dflog" @@ -127,7 +128,7 @@ func (s *GRPC) GetCDN(ctx context.Context, req *manager.GetCDNRequest) (*manager return &pbCDN, nil } -func (s *GRPC) CreateCDN(ctx context.Context, req *manager.CreateCDNRequest) (*manager.CDN, error) { +func (s *GRPC) createCDN(ctx context.Context, req *manager.UpdateCDNRequest) (*manager.CDN, error) { if err := req.Validate(); err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } @@ -142,7 +143,7 @@ func (s *GRPC) CreateCDN(ctx context.Context, req *manager.CreateCDNRequest) (*m } if err := s.db.Create(&cdn).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } return &manager.CDN{ @@ -162,14 +163,21 @@ func (s *GRPC) UpdateCDN(ctx context.Context, req *manager.UpdateCDNRequest) (*m } cdn := model.CDN{} - if err := s.db.First(&cdn, model.CDN{HostName: req.HostName}).Updates(model.CDN{ + if err := s.db.First(&cdn, model.CDN{HostName: req.HostName}).Error; err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + return s.createCDN(ctx, req) + } + return nil, status.Error(codes.Unknown, err.Error()) + } + + if err := s.db.Model(&cdn).Updates(model.CDN{ IDC: req.Idc, Location: req.Location, IP: req.Ip, Port: req.Port, DownloadPort: req.DownloadPort, }).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -197,16 +205,16 @@ func (s *GRPC) AddCDNToCDNCluster(ctx context.Context, req *manager.AddCDNToCDNC cdnCluster := model.CDNCluster{} if err := s.db.First(&cdnCluster, req.CdnClusterId).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } cdn := model.CDN{} if err := s.db.First(&cdn, req.CdnId).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.db.Model(&cdnCluster).Association("CDNs").Append(&cdn); err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -314,7 +322,7 @@ func (s *GRPC) GetScheduler(ctx context.Context, req *manager.GetSchedulerReques return &pbScheduler, nil } -func (s *GRPC) CreateScheduler(ctx context.Context, req *manager.CreateSchedulerRequest) (*manager.Scheduler, error) { +func (s *GRPC) createScheduler(ctx context.Context, req *manager.UpdateSchedulerRequest) (*manager.Scheduler, error) { if err := req.Validate(); err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } @@ -337,7 +345,7 @@ func (s *GRPC) CreateScheduler(ctx context.Context, req *manager.CreateScheduler } if err := s.db.Create(&scheduler).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } return &manager.Scheduler{ @@ -358,6 +366,14 @@ func (s *GRPC) UpdateScheduler(ctx context.Context, req *manager.UpdateScheduler return nil, status.Error(codes.InvalidArgument, err.Error()) } + scheduler := model.Scheduler{} + if err := s.db.First(&scheduler, model.Scheduler{HostName: req.HostName}).Error; err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + return s.createScheduler(ctx, req) + } + return nil, status.Error(codes.Unknown, err.Error()) + } + var netConfig datatypes.JSONMap if len(req.NetConfig) > 0 { if err := netConfig.UnmarshalJSON(req.NetConfig); err != nil { @@ -365,8 +381,7 @@ func (s *GRPC) UpdateScheduler(ctx context.Context, req *manager.UpdateScheduler } } - scheduler := model.Scheduler{} - if err := s.db.First(&scheduler, model.Scheduler{HostName: req.HostName}).Updates(model.Scheduler{ + if err := s.db.Model(&scheduler).Updates(model.Scheduler{ VIPs: req.Vips, IDC: req.Idc, Location: req.Location, @@ -374,7 +389,7 @@ func (s *GRPC) UpdateScheduler(ctx context.Context, req *manager.UpdateScheduler IP: req.Ip, Port: req.Port, }).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -404,16 +419,16 @@ func (s *GRPC) AddSchedulerClusterToSchedulerCluster(ctx context.Context, req *m schedulerCluster := model.SchedulerCluster{} if err := s.db.First(&schedulerCluster, req.SchedulerClusterId).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } scheduler := model.Scheduler{} if err := s.db.First(&scheduler, req.SchedulerId).Error; err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.db.Model(&schedulerCluster).Association("Schedulers").Append(&scheduler); err != nil { - return nil, err + return nil, status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -500,7 +515,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { req, err := m.Recv() if err != nil { logger.Errorf("keepalive failed for the first time: %v", err) - return err + return status.Error(codes.Unknown, err.Error()) } if err := req.Validate(); err != nil { return status.Error(codes.InvalidArgument, err.Error()) @@ -518,7 +533,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { }).Updates(model.Scheduler{ Status: model.SchedulerStatusActive, }).Error; err != nil { - return err + return status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -537,7 +552,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { }).Updates(model.CDN{ Status: model.CDNStatusActive, }).Error; err != nil { - return err + return status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -559,7 +574,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { }).Updates(model.Scheduler{ Status: model.SchedulerStatusInactive, }).Error; err != nil { - return err + return status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -578,7 +593,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { }).Updates(model.CDN{ Status: model.CDNStatusInactive, }).Error; err != nil { - return err + return status.Error(codes.Unknown, err.Error()) } if err := s.cache.Delete( @@ -594,7 +609,7 @@ func (s *GRPC) KeepAlive(m manager.Manager_KeepAliveServer) error { return nil } logger.Errorf("%s keepalive failed: %v", hostName, err) - return err + return status.Error(codes.Unknown, err.Error()) } logger.Debugf("%s type of %s send keepalive request", sourceType, hostName) diff --git a/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go b/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go index d5b70a7c4e2..f2994552e2a 100644 --- a/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go +++ b/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go @@ -12,6 +12,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // SeederClient is the client API for Seeder service. @@ -33,7 +34,7 @@ func NewSeederClient(cc grpc.ClientConnInterface) SeederClient { } func (c *seederClient) ObtainSeeds(ctx context.Context, in *SeedRequest, opts ...grpc.CallOption) (Seeder_ObtainSeedsClient, error) { - stream, err := c.cc.NewStream(ctx, &_Seeder_serviceDesc.Streams[0], "/cdnsystem.Seeder/ObtainSeeds", opts...) + stream, err := c.cc.NewStream(ctx, &Seeder_ServiceDesc.Streams[0], "/cdnsystem.Seeder/ObtainSeeds", opts...) if err != nil { return nil, err } @@ -104,7 +105,7 @@ type UnsafeSeederServer interface { } func RegisterSeederServer(s grpc.ServiceRegistrar, srv SeederServer) { - s.RegisterService(&_Seeder_serviceDesc, srv) + s.RegisterService(&Seeder_ServiceDesc, srv) } func _Seeder_ObtainSeeds_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -146,7 +147,10 @@ func _Seeder_GetPieceTasks_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var _Seeder_serviceDesc = grpc.ServiceDesc{ +// Seeder_ServiceDesc is the grpc.ServiceDesc for Seeder service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Seeder_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cdnsystem.Seeder", HandlerType: (*SeederServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go b/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go index 851f7c117e4..c5e63251d75 100644 --- a/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go +++ b/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go @@ -13,6 +13,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // DaemonClient is the client API for Daemon service. @@ -36,7 +37,7 @@ func NewDaemonClient(cc grpc.ClientConnInterface) DaemonClient { } func (c *daemonClient) Download(ctx context.Context, in *DownRequest, opts ...grpc.CallOption) (Daemon_DownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_Daemon_serviceDesc.Streams[0], "/dfdaemon.Daemon/Download", opts...) + stream, err := c.cc.NewStream(ctx, &Daemon_ServiceDesc.Streams[0], "/dfdaemon.Daemon/Download", opts...) if err != nil { return nil, err } @@ -121,7 +122,7 @@ type UnsafeDaemonServer interface { } func RegisterDaemonServer(s grpc.ServiceRegistrar, srv DaemonServer) { - s.RegisterService(&_Daemon_serviceDesc, srv) + s.RegisterService(&Daemon_ServiceDesc, srv) } func _Daemon_Download_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -181,7 +182,10 @@ func _Daemon_CheckHealth_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var _Daemon_serviceDesc = grpc.ServiceDesc{ +// Daemon_ServiceDesc is the grpc.ServiceDesc for Daemon service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Daemon_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dfdaemon.Daemon", HandlerType: (*DaemonServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/pkg/rpc/manager/manager.pb.go b/pkg/rpc/manager/manager.pb.go index d5cfc99ade2..1335791a054 100644 --- a/pkg/rpc/manager/manager.pb.go +++ b/pkg/rpc/manager/manager.pb.go @@ -410,101 +410,6 @@ func (x *GetCDNRequest) GetHostName() string { return "" } -type CreateCDNRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SourceType SourceType `protobuf:"varint,1,opt,name=source_type,json=sourceType,proto3,enum=manager.SourceType" json:"source_type,omitempty"` - HostName string `protobuf:"bytes,2,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` - Idc string `protobuf:"bytes,4,opt,name=idc,proto3" json:"idc,omitempty"` - Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` - Ip string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"` - Port int32 `protobuf:"varint,7,opt,name=port,proto3" json:"port,omitempty"` - DownloadPort int32 `protobuf:"varint,8,opt,name=download_port,json=downloadPort,proto3" json:"download_port,omitempty"` -} - -func (x *CreateCDNRequest) Reset() { - *x = CreateCDNRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateCDNRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateCDNRequest) ProtoMessage() {} - -func (x *CreateCDNRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[4] - 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 CreateCDNRequest.ProtoReflect.Descriptor instead. -func (*CreateCDNRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{4} -} - -func (x *CreateCDNRequest) GetSourceType() SourceType { - if x != nil { - return x.SourceType - } - return SourceType_SCHEDULER_SOURCE -} - -func (x *CreateCDNRequest) GetHostName() string { - if x != nil { - return x.HostName - } - return "" -} - -func (x *CreateCDNRequest) GetIdc() string { - if x != nil { - return x.Idc - } - return "" -} - -func (x *CreateCDNRequest) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *CreateCDNRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *CreateCDNRequest) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *CreateCDNRequest) GetDownloadPort() int32 { - if x != nil { - return x.DownloadPort - } - return 0 -} - type UpdateCDNRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -522,7 +427,7 @@ type UpdateCDNRequest struct { func (x *UpdateCDNRequest) Reset() { *x = UpdateCDNRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[5] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -535,7 +440,7 @@ func (x *UpdateCDNRequest) String() string { func (*UpdateCDNRequest) ProtoMessage() {} func (x *UpdateCDNRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[5] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,7 +453,7 @@ func (x *UpdateCDNRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateCDNRequest.ProtoReflect.Descriptor instead. func (*UpdateCDNRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{5} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{4} } func (x *UpdateCDNRequest) GetSourceType() SourceType { @@ -613,7 +518,7 @@ type AddCDNToCDNClusterRequest struct { func (x *AddCDNToCDNClusterRequest) Reset() { *x = AddCDNToCDNClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[6] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -626,7 +531,7 @@ func (x *AddCDNToCDNClusterRequest) String() string { func (*AddCDNToCDNClusterRequest) ProtoMessage() {} func (x *AddCDNToCDNClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[6] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -639,7 +544,7 @@ func (x *AddCDNToCDNClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddCDNToCDNClusterRequest.ProtoReflect.Descriptor instead. func (*AddCDNToCDNClusterRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{6} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{5} } func (x *AddCDNToCDNClusterRequest) GetSourceType() SourceType { @@ -679,7 +584,7 @@ type SchedulerCluster struct { func (x *SchedulerCluster) Reset() { *x = SchedulerCluster{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[7] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -692,7 +597,7 @@ func (x *SchedulerCluster) String() string { func (*SchedulerCluster) ProtoMessage() {} func (x *SchedulerCluster) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[7] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -705,7 +610,7 @@ func (x *SchedulerCluster) ProtoReflect() protoreflect.Message { // Deprecated: Use SchedulerCluster.ProtoReflect.Descriptor instead. func (*SchedulerCluster) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{7} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{6} } func (x *SchedulerCluster) GetId() uint64 { @@ -771,7 +676,7 @@ type Scheduler struct { func (x *Scheduler) Reset() { *x = Scheduler{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[8] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -784,7 +689,7 @@ func (x *Scheduler) String() string { func (*Scheduler) ProtoMessage() {} func (x *Scheduler) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[8] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -797,7 +702,7 @@ func (x *Scheduler) ProtoReflect() protoreflect.Message { // Deprecated: Use Scheduler.ProtoReflect.Descriptor instead. func (*Scheduler) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{8} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{7} } func (x *Scheduler) GetId() uint64 { @@ -889,7 +794,7 @@ type GetSchedulerRequest struct { func (x *GetSchedulerRequest) Reset() { *x = GetSchedulerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[9] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -902,7 +807,7 @@ func (x *GetSchedulerRequest) String() string { func (*GetSchedulerRequest) ProtoMessage() {} func (x *GetSchedulerRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[9] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -915,7 +820,7 @@ func (x *GetSchedulerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchedulerRequest.ProtoReflect.Descriptor instead. func (*GetSchedulerRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{9} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{8} } func (x *GetSchedulerRequest) GetSourceType() SourceType { @@ -932,109 +837,6 @@ func (x *GetSchedulerRequest) GetHostName() string { return "" } -type CreateSchedulerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SourceType SourceType `protobuf:"varint,1,opt,name=source_type,json=sourceType,proto3,enum=manager.SourceType" json:"source_type,omitempty"` - HostName string `protobuf:"bytes,2,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` - Vips string `protobuf:"bytes,4,opt,name=vips,proto3" json:"vips,omitempty"` - Idc string `protobuf:"bytes,5,opt,name=idc,proto3" json:"idc,omitempty"` - Location string `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"` - NetConfig []byte `protobuf:"bytes,7,opt,name=net_config,json=netConfig,proto3" json:"net_config,omitempty"` - Ip string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip,omitempty"` - Port int32 `protobuf:"varint,9,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *CreateSchedulerRequest) Reset() { - *x = CreateSchedulerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSchedulerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSchedulerRequest) ProtoMessage() {} - -func (x *CreateSchedulerRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[10] - 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 CreateSchedulerRequest.ProtoReflect.Descriptor instead. -func (*CreateSchedulerRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{10} -} - -func (x *CreateSchedulerRequest) GetSourceType() SourceType { - if x != nil { - return x.SourceType - } - return SourceType_SCHEDULER_SOURCE -} - -func (x *CreateSchedulerRequest) GetHostName() string { - if x != nil { - return x.HostName - } - return "" -} - -func (x *CreateSchedulerRequest) GetVips() string { - if x != nil { - return x.Vips - } - return "" -} - -func (x *CreateSchedulerRequest) GetIdc() string { - if x != nil { - return x.Idc - } - return "" -} - -func (x *CreateSchedulerRequest) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *CreateSchedulerRequest) GetNetConfig() []byte { - if x != nil { - return x.NetConfig - } - return nil -} - -func (x *CreateSchedulerRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *CreateSchedulerRequest) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - type UpdateSchedulerRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1053,7 +855,7 @@ type UpdateSchedulerRequest struct { func (x *UpdateSchedulerRequest) Reset() { *x = UpdateSchedulerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[11] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1066,7 +868,7 @@ func (x *UpdateSchedulerRequest) String() string { func (*UpdateSchedulerRequest) ProtoMessage() {} func (x *UpdateSchedulerRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[11] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1079,7 +881,7 @@ func (x *UpdateSchedulerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateSchedulerRequest.ProtoReflect.Descriptor instead. func (*UpdateSchedulerRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{11} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{9} } func (x *UpdateSchedulerRequest) GetSourceType() SourceType { @@ -1151,7 +953,7 @@ type AddSchedulerClusterToSchedulerClusterRequest struct { func (x *AddSchedulerClusterToSchedulerClusterRequest) Reset() { *x = AddSchedulerClusterToSchedulerClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[12] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1164,7 +966,7 @@ func (x *AddSchedulerClusterToSchedulerClusterRequest) String() string { func (*AddSchedulerClusterToSchedulerClusterRequest) ProtoMessage() {} func (x *AddSchedulerClusterToSchedulerClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[12] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1177,7 +979,7 @@ func (x *AddSchedulerClusterToSchedulerClusterRequest) ProtoReflect() protorefle // Deprecated: Use AddSchedulerClusterToSchedulerClusterRequest.ProtoReflect.Descriptor instead. func (*AddSchedulerClusterToSchedulerClusterRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{12} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{10} } func (x *AddSchedulerClusterToSchedulerClusterRequest) GetSourceType() SourceType { @@ -1215,7 +1017,7 @@ type ListSchedulersRequest struct { func (x *ListSchedulersRequest) Reset() { *x = ListSchedulersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[13] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1228,7 +1030,7 @@ func (x *ListSchedulersRequest) String() string { func (*ListSchedulersRequest) ProtoMessage() {} func (x *ListSchedulersRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[13] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1241,7 +1043,7 @@ func (x *ListSchedulersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSchedulersRequest.ProtoReflect.Descriptor instead. func (*ListSchedulersRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{13} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{11} } func (x *ListSchedulersRequest) GetSourceType() SourceType { @@ -1283,7 +1085,7 @@ type ListSchedulersResponse struct { func (x *ListSchedulersResponse) Reset() { *x = ListSchedulersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[14] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1296,7 +1098,7 @@ func (x *ListSchedulersResponse) String() string { func (*ListSchedulersResponse) ProtoMessage() {} func (x *ListSchedulersResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[14] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1309,7 +1111,7 @@ func (x *ListSchedulersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSchedulersResponse.ProtoReflect.Descriptor instead. func (*ListSchedulersResponse) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{14} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{12} } func (x *ListSchedulersResponse) GetSchedulers() []*Scheduler { @@ -1331,7 +1133,7 @@ type KeepAliveRequest struct { func (x *KeepAliveRequest) Reset() { *x = KeepAliveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[15] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1344,7 +1146,7 @@ func (x *KeepAliveRequest) String() string { func (*KeepAliveRequest) ProtoMessage() {} func (x *KeepAliveRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_rpc_manager_manager_proto_msgTypes[15] + mi := &file_pkg_rpc_manager_manager_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1357,7 +1159,7 @@ func (x *KeepAliveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeepAliveRequest.ProtoReflect.Descriptor instead. func (*KeepAliveRequest) Descriptor() ([]byte, []int) { - return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{15} + return file_pkg_rpc_manager_manager_proto_rawDescGZIP(), []int{13} } func (x *KeepAliveRequest) GetSourceType() SourceType { @@ -1424,7 +1226,7 @@ var file_pkg_rpc_manager_manager_proto_rawDesc = []byte{ 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb0, - 0x02, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, 0x65, 0x71, 0x75, + 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, @@ -1432,202 +1234,153 @@ var file_pkg_rpc_manager_manager_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x03, 0x69, 0x64, 0x63, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x27, 0x0a, 0x08, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, + 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, - 0x74, 0x22, 0xb7, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x03, - 0x69, 0x64, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, - 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x27, 0x0a, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x70, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x02, - 0x69, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x40, 0x01, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0e, 0xfa, - 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x40, 0x01, 0x52, 0x0c, 0x64, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x19, - 0x41, 0x64, 0x64, 0x43, 0x44, 0x4e, 0x54, 0x6f, 0x43, 0x44, 0x4e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x63, 0x64, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, - 0x40, 0x01, 0x52, 0x05, 0x63, 0x64, 0x6e, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0e, 0x63, 0x64, 0x6e, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x0c, 0x63, 0x64, 0x6e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x62, 0x69, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x3d, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, - 0xbf, 0x02, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, - 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x69, 0x70, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x10, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x20, 0x0a, 0x04, 0x63, 0x64, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x44, 0x4e, 0x52, 0x04, 0x63, 0x64, 0x6e, - 0x73, 0x22, 0x7b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x43, 0x44, 0x4e, 0x54, 0x6f, 0x43, 0x44, + 0x4e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1e, 0x0a, 0x06, 0x63, 0x64, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x05, 0x63, 0x64, 0x6e, 0x49, 0x64, 0x12, + 0x2d, 0x0a, 0x0e, 0x63, 0x64, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, + 0x52, 0x0c, 0x63, 0x64, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xc4, + 0x01, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x6f, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x69, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xbf, 0x02, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x76, 0x69, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x76, 0x69, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, + 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x64, 0x6e, 0x73, 0x18, 0x0c, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x44, + 0x4e, 0x52, 0x04, 0x63, 0x64, 0x6e, 0x73, 0x22, 0x7b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, + 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd0, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x69, 0x70, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, + 0x01, 0x01, 0x52, 0x04, 0x76, 0x69, 0x70, 0x73, 0x12, 0x1f, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, + 0x08, 0xd0, 0x01, 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x27, 0x0a, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, + 0x72, 0x06, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x70, + 0x01, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x02, + 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, + 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, + 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x2c, 0x41, 0x64, 0x64, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, + 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd0, - 0x02, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, + 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x14, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x12, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, + 0xa8, 0x02, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x04, 0x76, 0x69, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x76, 0x69, - 0x70, 0x73, 0x12, 0x1f, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x03, - 0x69, 0x64, 0x63, 0x12, 0x27, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x08, 0xd0, - 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0a, - 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x70, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, - 0x20, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x42, 0x0c, 0xfa, - 0x42, 0x09, 0x1a, 0x07, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, 0x08, 0x52, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x22, 0xd5, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, + 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x53, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x9a, 0x01, + 0x02, 0x30, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x3b, 0x0a, + 0x0d, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x0a, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x65, 0x65, 0x70, + 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x69, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, - 0x04, 0x76, 0x69, 0x70, 0x73, 0x12, 0x1f, 0x0a, 0x03, 0x69, 0x64, 0x63, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0x18, 0x80, 0x08, 0xd0, 0x01, - 0x01, 0x52, 0x03, 0x69, 0x64, 0x63, 0x12, 0x27, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, - 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x7a, 0x04, 0x10, 0x01, 0x70, 0x01, 0x52, 0x09, - 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x70, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x70, 0x01, 0xd0, 0x01, - 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x1a, 0x09, 0x10, 0xff, 0xff, 0x03, 0x28, 0x80, - 0x08, 0x40, 0x01, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x2c, 0x41, 0x64, - 0x64, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x14, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x40, 0x01, 0x52, 0x12, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, - 0x64, 0x22, 0xa8, 0x02, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x70, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x53, 0x0a, 0x09, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x9a, 0x01, 0x02, 0x30, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, - 0x3b, 0x0a, 0x0d, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x16, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x0a, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x73, 0x22, 0x78, 0x0a, 0x10, 0x4b, 0x65, - 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, - 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, - 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x68, 0x01, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0x45, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x52, 0x5f, - 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, - 0x4e, 0x54, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, - 0x44, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x32, 0xd6, 0x05, 0x0a, 0x07, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x43, 0x44, - 0x4e, 0x12, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x44, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x43, 0x44, 0x4e, 0x12, 0x34, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x44, 0x4e, 0x12, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x44, 0x4e, 0x12, 0x34, 0x0a, - 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x12, 0x19, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x43, 0x44, 0x4e, 0x12, 0x50, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x43, 0x44, 0x4e, 0x54, 0x6f, 0x43, - 0x44, 0x4e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x44, 0x4e, 0x54, 0x6f, 0x43, 0x44, 0x4e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, 0x40, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x6d, 0x65, 0x2a, 0x45, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x10, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x52, 0x5f, 0x53, 0x4f, + 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x44, 0x4e, + 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x32, 0xd8, 0x04, 0x0a, 0x07, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x43, 0x44, 0x4e, 0x12, + 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x44, 0x4e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2e, 0x43, 0x44, 0x4e, 0x12, 0x34, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x44, 0x4e, 0x12, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x44, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x44, 0x4e, 0x12, 0x50, 0x0a, 0x12, 0x41, + 0x64, 0x64, 0x43, 0x44, 0x4e, 0x54, 0x6f, 0x43, 0x44, 0x4e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x43, + 0x44, 0x4e, 0x54, 0x6f, 0x43, 0x44, 0x4e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, 0x40, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x1c, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, @@ -1670,71 +1423,63 @@ func file_pkg_rpc_manager_manager_proto_rawDescGZIP() []byte { } var file_pkg_rpc_manager_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_rpc_manager_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_pkg_rpc_manager_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_pkg_rpc_manager_manager_proto_goTypes = []interface{}{ (SourceType)(0), // 0: manager.SourceType (*CDNCluster)(nil), // 1: manager.CDNCluster (*SecurityGroup)(nil), // 2: manager.SecurityGroup (*CDN)(nil), // 3: manager.CDN (*GetCDNRequest)(nil), // 4: manager.GetCDNRequest - (*CreateCDNRequest)(nil), // 5: manager.CreateCDNRequest - (*UpdateCDNRequest)(nil), // 6: manager.UpdateCDNRequest - (*AddCDNToCDNClusterRequest)(nil), // 7: manager.AddCDNToCDNClusterRequest - (*SchedulerCluster)(nil), // 8: manager.SchedulerCluster - (*Scheduler)(nil), // 9: manager.Scheduler - (*GetSchedulerRequest)(nil), // 10: manager.GetSchedulerRequest - (*CreateSchedulerRequest)(nil), // 11: manager.CreateSchedulerRequest - (*UpdateSchedulerRequest)(nil), // 12: manager.UpdateSchedulerRequest - (*AddSchedulerClusterToSchedulerClusterRequest)(nil), // 13: manager.AddSchedulerClusterToSchedulerClusterRequest - (*ListSchedulersRequest)(nil), // 14: manager.ListSchedulersRequest - (*ListSchedulersResponse)(nil), // 15: manager.ListSchedulersResponse - (*KeepAliveRequest)(nil), // 16: manager.KeepAliveRequest - nil, // 17: manager.ListSchedulersRequest.HostInfoEntry - (*emptypb.Empty)(nil), // 18: google.protobuf.Empty + (*UpdateCDNRequest)(nil), // 5: manager.UpdateCDNRequest + (*AddCDNToCDNClusterRequest)(nil), // 6: manager.AddCDNToCDNClusterRequest + (*SchedulerCluster)(nil), // 7: manager.SchedulerCluster + (*Scheduler)(nil), // 8: manager.Scheduler + (*GetSchedulerRequest)(nil), // 9: manager.GetSchedulerRequest + (*UpdateSchedulerRequest)(nil), // 10: manager.UpdateSchedulerRequest + (*AddSchedulerClusterToSchedulerClusterRequest)(nil), // 11: manager.AddSchedulerClusterToSchedulerClusterRequest + (*ListSchedulersRequest)(nil), // 12: manager.ListSchedulersRequest + (*ListSchedulersResponse)(nil), // 13: manager.ListSchedulersResponse + (*KeepAliveRequest)(nil), // 14: manager.KeepAliveRequest + nil, // 15: manager.ListSchedulersRequest.HostInfoEntry + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty } var file_pkg_rpc_manager_manager_proto_depIdxs = []int32{ 2, // 0: manager.CDNCluster.security_group:type_name -> manager.SecurityGroup 1, // 1: manager.CDN.cdn_cluster:type_name -> manager.CDNCluster 0, // 2: manager.GetCDNRequest.source_type:type_name -> manager.SourceType - 0, // 3: manager.CreateCDNRequest.source_type:type_name -> manager.SourceType - 0, // 4: manager.UpdateCDNRequest.source_type:type_name -> manager.SourceType - 0, // 5: manager.AddCDNToCDNClusterRequest.source_type:type_name -> manager.SourceType - 2, // 6: manager.SchedulerCluster.security_group:type_name -> manager.SecurityGroup - 8, // 7: manager.Scheduler.scheduler_cluster:type_name -> manager.SchedulerCluster - 3, // 8: manager.Scheduler.cdns:type_name -> manager.CDN - 0, // 9: manager.GetSchedulerRequest.source_type:type_name -> manager.SourceType - 0, // 10: manager.CreateSchedulerRequest.source_type:type_name -> manager.SourceType - 0, // 11: manager.UpdateSchedulerRequest.source_type:type_name -> manager.SourceType - 0, // 12: manager.AddSchedulerClusterToSchedulerClusterRequest.source_type:type_name -> manager.SourceType - 0, // 13: manager.ListSchedulersRequest.source_type:type_name -> manager.SourceType - 17, // 14: manager.ListSchedulersRequest.host_info:type_name -> manager.ListSchedulersRequest.HostInfoEntry - 9, // 15: manager.ListSchedulersResponse.schedulers:type_name -> manager.Scheduler - 0, // 16: manager.KeepAliveRequest.source_type:type_name -> manager.SourceType - 4, // 17: manager.Manager.GetCDN:input_type -> manager.GetCDNRequest - 5, // 18: manager.Manager.CreateCDN:input_type -> manager.CreateCDNRequest - 6, // 19: manager.Manager.UpdateCDN:input_type -> manager.UpdateCDNRequest - 7, // 20: manager.Manager.AddCDNToCDNCluster:input_type -> manager.AddCDNToCDNClusterRequest - 10, // 21: manager.Manager.GetScheduler:input_type -> manager.GetSchedulerRequest - 11, // 22: manager.Manager.CreateScheduler:input_type -> manager.CreateSchedulerRequest - 12, // 23: manager.Manager.UpdateScheduler:input_type -> manager.UpdateSchedulerRequest - 13, // 24: manager.Manager.AddSchedulerClusterToSchedulerCluster:input_type -> manager.AddSchedulerClusterToSchedulerClusterRequest - 14, // 25: manager.Manager.ListSchedulers:input_type -> manager.ListSchedulersRequest - 16, // 26: manager.Manager.KeepAlive:input_type -> manager.KeepAliveRequest - 3, // 27: manager.Manager.GetCDN:output_type -> manager.CDN - 3, // 28: manager.Manager.CreateCDN:output_type -> manager.CDN - 3, // 29: manager.Manager.UpdateCDN:output_type -> manager.CDN - 18, // 30: manager.Manager.AddCDNToCDNCluster:output_type -> google.protobuf.Empty - 9, // 31: manager.Manager.GetScheduler:output_type -> manager.Scheduler - 9, // 32: manager.Manager.CreateScheduler:output_type -> manager.Scheduler - 9, // 33: manager.Manager.UpdateScheduler:output_type -> manager.Scheduler - 18, // 34: manager.Manager.AddSchedulerClusterToSchedulerCluster:output_type -> google.protobuf.Empty - 15, // 35: manager.Manager.ListSchedulers:output_type -> manager.ListSchedulersResponse - 18, // 36: manager.Manager.KeepAlive:output_type -> google.protobuf.Empty - 27, // [27:37] is the sub-list for method output_type - 17, // [17:27] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 0, // 3: manager.UpdateCDNRequest.source_type:type_name -> manager.SourceType + 0, // 4: manager.AddCDNToCDNClusterRequest.source_type:type_name -> manager.SourceType + 2, // 5: manager.SchedulerCluster.security_group:type_name -> manager.SecurityGroup + 7, // 6: manager.Scheduler.scheduler_cluster:type_name -> manager.SchedulerCluster + 3, // 7: manager.Scheduler.cdns:type_name -> manager.CDN + 0, // 8: manager.GetSchedulerRequest.source_type:type_name -> manager.SourceType + 0, // 9: manager.UpdateSchedulerRequest.source_type:type_name -> manager.SourceType + 0, // 10: manager.AddSchedulerClusterToSchedulerClusterRequest.source_type:type_name -> manager.SourceType + 0, // 11: manager.ListSchedulersRequest.source_type:type_name -> manager.SourceType + 15, // 12: manager.ListSchedulersRequest.host_info:type_name -> manager.ListSchedulersRequest.HostInfoEntry + 8, // 13: manager.ListSchedulersResponse.schedulers:type_name -> manager.Scheduler + 0, // 14: manager.KeepAliveRequest.source_type:type_name -> manager.SourceType + 4, // 15: manager.Manager.GetCDN:input_type -> manager.GetCDNRequest + 5, // 16: manager.Manager.UpdateCDN:input_type -> manager.UpdateCDNRequest + 6, // 17: manager.Manager.AddCDNToCDNCluster:input_type -> manager.AddCDNToCDNClusterRequest + 9, // 18: manager.Manager.GetScheduler:input_type -> manager.GetSchedulerRequest + 10, // 19: manager.Manager.UpdateScheduler:input_type -> manager.UpdateSchedulerRequest + 11, // 20: manager.Manager.AddSchedulerClusterToSchedulerCluster:input_type -> manager.AddSchedulerClusterToSchedulerClusterRequest + 12, // 21: manager.Manager.ListSchedulers:input_type -> manager.ListSchedulersRequest + 14, // 22: manager.Manager.KeepAlive:input_type -> manager.KeepAliveRequest + 3, // 23: manager.Manager.GetCDN:output_type -> manager.CDN + 3, // 24: manager.Manager.UpdateCDN:output_type -> manager.CDN + 16, // 25: manager.Manager.AddCDNToCDNCluster:output_type -> google.protobuf.Empty + 8, // 26: manager.Manager.GetScheduler:output_type -> manager.Scheduler + 8, // 27: manager.Manager.UpdateScheduler:output_type -> manager.Scheduler + 16, // 28: manager.Manager.AddSchedulerClusterToSchedulerCluster:output_type -> google.protobuf.Empty + 13, // 29: manager.Manager.ListSchedulers:output_type -> manager.ListSchedulersResponse + 16, // 30: manager.Manager.KeepAlive:output_type -> google.protobuf.Empty + 23, // [23:31] is the sub-list for method output_type + 15, // [15:23] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_pkg_rpc_manager_manager_proto_init() } @@ -1792,18 +1537,6 @@ func file_pkg_rpc_manager_manager_proto_init() { } } file_pkg_rpc_manager_manager_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateCDNRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_rpc_manager_manager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateCDNRequest); i { case 0: return &v.state @@ -1815,7 +1548,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddCDNToCDNClusterRequest); i { case 0: return &v.state @@ -1827,7 +1560,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SchedulerCluster); i { case 0: return &v.state @@ -1839,7 +1572,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Scheduler); i { case 0: return &v.state @@ -1851,7 +1584,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSchedulerRequest); i { case 0: return &v.state @@ -1863,19 +1596,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSchedulerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_pkg_rpc_manager_manager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSchedulerRequest); i { case 0: return &v.state @@ -1887,7 +1608,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSchedulerClusterToSchedulerClusterRequest); i { case 0: return &v.state @@ -1899,7 +1620,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSchedulersRequest); i { case 0: return &v.state @@ -1911,7 +1632,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSchedulersResponse); i { case 0: return &v.state @@ -1923,7 +1644,7 @@ func file_pkg_rpc_manager_manager_proto_init() { return nil } } - file_pkg_rpc_manager_manager_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_pkg_rpc_manager_manager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KeepAliveRequest); i { case 0: return &v.state @@ -1942,7 +1663,7 @@ func file_pkg_rpc_manager_manager_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_rpc_manager_manager_proto_rawDesc, NumEnums: 1, - NumMessages: 17, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/rpc/manager/manager.pb.validate.go b/pkg/rpc/manager/manager.pb.validate.go index ac1cb038671..6024806014d 100644 --- a/pkg/rpc/manager/manager.pb.validate.go +++ b/pkg/rpc/manager/manager.pb.validate.go @@ -390,23 +390,23 @@ var _ interface { ErrorName() string } = GetCDNRequestValidationError{} -// Validate checks the field values on CreateCDNRequest with the rules defined +// Validate checks the field values on UpdateCDNRequest with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned. -func (m *CreateCDNRequest) Validate() error { +func (m *UpdateCDNRequest) Validate() error { if m == nil { return nil } if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "SourceType", reason: "value must be one of the defined enum values", } } if err := m._validateHostname(m.GetHostName()); err != nil { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "HostName", reason: "value must be a valid hostname", cause: err, @@ -416,7 +416,7 @@ func (m *CreateCDNRequest) Validate() error { if m.GetIdc() != "" { if l := utf8.RuneCountInString(m.GetIdc()); l < 1 || l > 1024 { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "Idc", reason: "value length must be between 1 and 1024 runes, inclusive", } @@ -427,7 +427,7 @@ func (m *CreateCDNRequest) Validate() error { if m.GetLocation() != "" { if utf8.RuneCountInString(m.GetLocation()) > 1024 { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "Location", reason: "value length must be at most 1024 runes", } @@ -436,21 +436,21 @@ func (m *CreateCDNRequest) Validate() error { } if ip := net.ParseIP(m.GetIp()); ip == nil { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "Ip", reason: "value must be a valid IP address", } } if val := m.GetPort(); val < 1024 || val >= 65535 { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "Port", reason: "value must be inside range [1024, 65535)", } } if val := m.GetDownloadPort(); val < 1024 || val >= 65535 { - return CreateCDNRequestValidationError{ + return UpdateCDNRequestValidationError{ field: "DownloadPort", reason: "value must be inside range [1024, 65535)", } @@ -459,171 +459,6 @@ func (m *CreateCDNRequest) Validate() error { return nil } -func (m *CreateCDNRequest) _validateHostname(host string) error { - s := strings.ToLower(strings.TrimSuffix(host, ".")) - - if len(host) > 253 { - return errors.New("hostname cannot exceed 253 characters") - } - - for _, part := range strings.Split(s, ".") { - if l := len(part); l == 0 || l > 63 { - return errors.New("hostname part must be non-empty and cannot exceed 63 characters") - } - - if part[0] == '-' { - return errors.New("hostname parts cannot begin with hyphens") - } - - if part[len(part)-1] == '-' { - return errors.New("hostname parts cannot end with hyphens") - } - - for _, r := range part { - if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { - return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) - } - } - } - - return nil -} - -// CreateCDNRequestValidationError is the validation error returned by -// CreateCDNRequest.Validate if the designated constraints aren't met. -type CreateCDNRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateCDNRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateCDNRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateCDNRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateCDNRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateCDNRequestValidationError) ErrorName() string { return "CreateCDNRequestValidationError" } - -// Error satisfies the builtin error interface -func (e CreateCDNRequestValidationError) 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 %sCreateCDNRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateCDNRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateCDNRequestValidationError{} - -// Validate checks the field values on UpdateCDNRequest with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *UpdateCDNRequest) Validate() error { - if m == nil { - return nil - } - - if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok { - return UpdateCDNRequestValidationError{ - field: "SourceType", - reason: "value must be one of the defined enum values", - } - } - - if err := m._validateHostname(m.GetHostName()); err != nil { - return UpdateCDNRequestValidationError{ - field: "HostName", - reason: "value must be a valid hostname", - cause: err, - } - } - - if m.GetIdc() != "" { - - if l := utf8.RuneCountInString(m.GetIdc()); l < 1 || l > 1024 { - return UpdateCDNRequestValidationError{ - field: "Idc", - reason: "value length must be between 1 and 1024 runes, inclusive", - } - } - - } - - if m.GetLocation() != "" { - - if utf8.RuneCountInString(m.GetLocation()) > 1024 { - return UpdateCDNRequestValidationError{ - field: "Location", - reason: "value length must be at most 1024 runes", - } - } - - } - - if m.GetIp() != "" { - - if ip := net.ParseIP(m.GetIp()); ip == nil { - return UpdateCDNRequestValidationError{ - field: "Ip", - reason: "value must be a valid IP address", - } - } - - } - - if m.GetPort() != 0 { - - if val := m.GetPort(); val < 1024 || val >= 65535 { - return UpdateCDNRequestValidationError{ - field: "Port", - reason: "value must be inside range [1024, 65535)", - } - } - - } - - if m.GetDownloadPort() != 0 { - - if val := m.GetDownloadPort(); val < 1024 || val >= 65535 { - return UpdateCDNRequestValidationError{ - field: "DownloadPort", - reason: "value must be inside range [1024, 65535)", - } - } - - } - - return nil -} - func (m *UpdateCDNRequest) _validateHostname(host string) error { s := strings.ToLower(strings.TrimSuffix(host, ".")) @@ -1094,176 +929,6 @@ var _ interface { ErrorName() string } = GetSchedulerRequestValidationError{} -// Validate checks the field values on CreateSchedulerRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *CreateSchedulerRequest) Validate() error { - if m == nil { - return nil - } - - if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok { - return CreateSchedulerRequestValidationError{ - field: "SourceType", - reason: "value must be one of the defined enum values", - } - } - - if err := m._validateHostname(m.GetHostName()); err != nil { - return CreateSchedulerRequestValidationError{ - field: "HostName", - reason: "value must be a valid hostname", - cause: err, - } - } - - if m.GetVips() != "" { - - if l := utf8.RuneCountInString(m.GetVips()); l < 1 || l > 1024 { - return CreateSchedulerRequestValidationError{ - field: "Vips", - reason: "value length must be between 1 and 1024 runes, inclusive", - } - } - - } - - if m.GetIdc() != "" { - - if l := utf8.RuneCountInString(m.GetIdc()); l < 1 || l > 1024 { - return CreateSchedulerRequestValidationError{ - field: "Idc", - reason: "value length must be between 1 and 1024 runes, inclusive", - } - } - - } - - if m.GetLocation() != "" { - - if utf8.RuneCountInString(m.GetLocation()) > 1024 { - return CreateSchedulerRequestValidationError{ - field: "Location", - reason: "value length must be at most 1024 runes", - } - } - - } - - if len(m.GetNetConfig()) > 0 { - - if len(m.GetNetConfig()) < 1 { - return CreateSchedulerRequestValidationError{ - field: "NetConfig", - reason: "value length must be at least 1 bytes", - } - } - - } - - if ip := net.ParseIP(m.GetIp()); ip == nil { - return CreateSchedulerRequestValidationError{ - field: "Ip", - reason: "value must be a valid IP address", - } - } - - if val := m.GetPort(); val < 1024 || val >= 65535 { - return CreateSchedulerRequestValidationError{ - field: "Port", - reason: "value must be inside range [1024, 65535)", - } - } - - return nil -} - -func (m *CreateSchedulerRequest) _validateHostname(host string) error { - s := strings.ToLower(strings.TrimSuffix(host, ".")) - - if len(host) > 253 { - return errors.New("hostname cannot exceed 253 characters") - } - - for _, part := range strings.Split(s, ".") { - if l := len(part); l == 0 || l > 63 { - return errors.New("hostname part must be non-empty and cannot exceed 63 characters") - } - - if part[0] == '-' { - return errors.New("hostname parts cannot begin with hyphens") - } - - if part[len(part)-1] == '-' { - return errors.New("hostname parts cannot end with hyphens") - } - - for _, r := range part { - if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { - return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) - } - } - } - - return nil -} - -// CreateSchedulerRequestValidationError is the validation error returned by -// CreateSchedulerRequest.Validate if the designated constraints aren't met. -type CreateSchedulerRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateSchedulerRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateSchedulerRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateSchedulerRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateSchedulerRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateSchedulerRequestValidationError) ErrorName() string { - return "CreateSchedulerRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CreateSchedulerRequestValidationError) 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 %sCreateSchedulerRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateSchedulerRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateSchedulerRequestValidationError{} - // Validate checks the field values on UpdateSchedulerRequest with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. @@ -1331,26 +996,18 @@ func (m *UpdateSchedulerRequest) Validate() error { } - if m.GetIp() != "" { - - if ip := net.ParseIP(m.GetIp()); ip == nil { - return UpdateSchedulerRequestValidationError{ - field: "Ip", - reason: "value must be a valid IP address", - } + if ip := net.ParseIP(m.GetIp()); ip == nil { + return UpdateSchedulerRequestValidationError{ + field: "Ip", + reason: "value must be a valid IP address", } - } - if m.GetPort() != 0 { - - if val := m.GetPort(); val < 1024 || val >= 65535 { - return UpdateSchedulerRequestValidationError{ - field: "Port", - reason: "value must be inside range [1024, 65535)", - } + if val := m.GetPort(); val < 1024 || val >= 65535 { + return UpdateSchedulerRequestValidationError{ + field: "Port", + reason: "value must be inside range [1024, 65535)", } - } return nil diff --git a/pkg/rpc/manager/manager.proto b/pkg/rpc/manager/manager.proto index 490f7996b8b..646c0889eb1 100644 --- a/pkg/rpc/manager/manager.proto +++ b/pkg/rpc/manager/manager.proto @@ -62,24 +62,14 @@ message GetCDNRequest { string host_name = 2 [(validate.rules).string.hostname = true]; } -message CreateCDNRequest { - SourceType source_type = 1 [(validate.rules).enum.defined_only = true]; - string host_name = 2 [(validate.rules).string.hostname = true]; - string idc = 4 [(validate.rules).string = {min_len: 1, max_len: 1024, ignore_empty: true}]; - string location = 5 [(validate.rules).string = {max_len: 1024, ignore_empty: true}]; - string ip = 6 [(validate.rules).string.ip = true]; - int32 port = 7 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; - int32 download_port = 8 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; -} - message UpdateCDNRequest { SourceType source_type = 1 [(validate.rules).enum.defined_only = true]; string host_name = 2 [(validate.rules).string.hostname = true]; string idc = 3 [(validate.rules).string = {min_len: 1, max_len: 1024, ignore_empty: true}]; string location = 4 [(validate.rules).string = {max_len: 1024, ignore_empty: true}]; - string ip = 5 [(validate.rules).string = {ip: true, ignore_empty: true}]; - int32 port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}]; - int32 download_port = 7 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}]; + string ip = 5 [(validate.rules).string = {ip: true}]; + int32 port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; + int32 download_port = 7 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; } message AddCDNToCDNClusterRequest { @@ -116,17 +106,6 @@ message GetSchedulerRequest { string host_name = 2 [(validate.rules).string.hostname = true]; } -message CreateSchedulerRequest { - SourceType source_type = 1 [(validate.rules).enum.defined_only = true]; - string host_name = 2 [(validate.rules).string.hostname = true]; - string vips = 4 [(validate.rules).string = {min_len: 1, max_len: 1024, ignore_empty: true}]; - string idc = 5 [(validate.rules).string = {min_len: 1, max_len: 1024, ignore_empty: true}]; - string location = 6 [(validate.rules).string = {max_len: 1024, ignore_empty: true}]; - bytes net_config = 7 [(validate.rules).bytes = {min_len: 1, ignore_empty: true}]; - string ip = 8 [(validate.rules).string.ip = true]; - int32 port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; -} - message UpdateSchedulerRequest { SourceType source_type = 1 [(validate.rules).enum.defined_only = true]; string host_name = 2 [(validate.rules).string.hostname = true]; @@ -134,8 +113,8 @@ message UpdateSchedulerRequest { string idc = 5 [(validate.rules).string = {min_len: 1, max_len: 1024, ignore_empty: true}]; string location = 6 [(validate.rules).string = {max_len: 1024, ignore_empty: true}]; bytes net_config = 7 [(validate.rules).bytes = {min_len: 1, ignore_empty: true}]; - string ip = 8 [(validate.rules).string = {ip: true, ignore_empty: true}]; - int32 port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}]; + string ip = 8 [(validate.rules).string = {ip: true}]; + int32 port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535}]; } message AddSchedulerClusterToSchedulerClusterRequest { @@ -164,16 +143,12 @@ message KeepAliveRequest { service Manager { // Get CDN and CDN cluster configuration rpc GetCDN(GetCDNRequest) returns(CDN); - // Create CDN configuration - rpc CreateCDN(CreateCDNRequest) returns(CDN); // Update CDN configuration rpc UpdateCDN(UpdateCDNRequest) returns(CDN); // AddCDNToCDNCluster add cdn to cdn cluster rpc AddCDNToCDNCluster(AddCDNToCDNClusterRequest) returns(google.protobuf.Empty); // Get Scheduler and Scheduler cluster configuration rpc GetScheduler(GetSchedulerRequest)returns(Scheduler); - // Create scheduler configuration - rpc CreateScheduler(CreateSchedulerRequest) returns(Scheduler); // Update scheduler configuration rpc UpdateScheduler(UpdateSchedulerRequest) returns(Scheduler); // AddSchedulerClusterToSchedulerCluster add scheduler to scheduler cluster diff --git a/pkg/rpc/manager/manager_grpc.pb.go b/pkg/rpc/manager/manager_grpc.pb.go index 07794a3b653..8400a05869b 100644 --- a/pkg/rpc/manager/manager_grpc.pb.go +++ b/pkg/rpc/manager/manager_grpc.pb.go @@ -12,6 +12,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ManagerClient is the client API for Manager service. @@ -20,16 +21,12 @@ const _ = grpc.SupportPackageIsVersion7 type ManagerClient interface { // Get CDN and CDN cluster configuration GetCDN(ctx context.Context, in *GetCDNRequest, opts ...grpc.CallOption) (*CDN, error) - // Create CDN configuration - CreateCDN(ctx context.Context, in *CreateCDNRequest, opts ...grpc.CallOption) (*CDN, error) // Update CDN configuration UpdateCDN(ctx context.Context, in *UpdateCDNRequest, opts ...grpc.CallOption) (*CDN, error) // AddCDNToCDNCluster add cdn to cdn cluster AddCDNToCDNCluster(ctx context.Context, in *AddCDNToCDNClusterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Get Scheduler and Scheduler cluster configuration GetScheduler(ctx context.Context, in *GetSchedulerRequest, opts ...grpc.CallOption) (*Scheduler, error) - // Create scheduler configuration - CreateScheduler(ctx context.Context, in *CreateSchedulerRequest, opts ...grpc.CallOption) (*Scheduler, error) // Update scheduler configuration UpdateScheduler(ctx context.Context, in *UpdateSchedulerRequest, opts ...grpc.CallOption) (*Scheduler, error) // AddSchedulerClusterToSchedulerCluster add scheduler to scheduler cluster @@ -57,15 +54,6 @@ func (c *managerClient) GetCDN(ctx context.Context, in *GetCDNRequest, opts ...g return out, nil } -func (c *managerClient) CreateCDN(ctx context.Context, in *CreateCDNRequest, opts ...grpc.CallOption) (*CDN, error) { - out := new(CDN) - err := c.cc.Invoke(ctx, "/manager.Manager/CreateCDN", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *managerClient) UpdateCDN(ctx context.Context, in *UpdateCDNRequest, opts ...grpc.CallOption) (*CDN, error) { out := new(CDN) err := c.cc.Invoke(ctx, "/manager.Manager/UpdateCDN", in, out, opts...) @@ -93,15 +81,6 @@ func (c *managerClient) GetScheduler(ctx context.Context, in *GetSchedulerReques return out, nil } -func (c *managerClient) CreateScheduler(ctx context.Context, in *CreateSchedulerRequest, opts ...grpc.CallOption) (*Scheduler, error) { - out := new(Scheduler) - err := c.cc.Invoke(ctx, "/manager.Manager/CreateScheduler", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *managerClient) UpdateScheduler(ctx context.Context, in *UpdateSchedulerRequest, opts ...grpc.CallOption) (*Scheduler, error) { out := new(Scheduler) err := c.cc.Invoke(ctx, "/manager.Manager/UpdateScheduler", in, out, opts...) @@ -130,7 +109,7 @@ func (c *managerClient) ListSchedulers(ctx context.Context, in *ListSchedulersRe } func (c *managerClient) KeepAlive(ctx context.Context, opts ...grpc.CallOption) (Manager_KeepAliveClient, error) { - stream, err := c.cc.NewStream(ctx, &_Manager_serviceDesc.Streams[0], "/manager.Manager/KeepAlive", opts...) + stream, err := c.cc.NewStream(ctx, &Manager_ServiceDesc.Streams[0], "/manager.Manager/KeepAlive", opts...) if err != nil { return nil, err } @@ -169,16 +148,12 @@ func (x *managerKeepAliveClient) CloseAndRecv() (*emptypb.Empty, error) { type ManagerServer interface { // Get CDN and CDN cluster configuration GetCDN(context.Context, *GetCDNRequest) (*CDN, error) - // Create CDN configuration - CreateCDN(context.Context, *CreateCDNRequest) (*CDN, error) // Update CDN configuration UpdateCDN(context.Context, *UpdateCDNRequest) (*CDN, error) // AddCDNToCDNCluster add cdn to cdn cluster AddCDNToCDNCluster(context.Context, *AddCDNToCDNClusterRequest) (*emptypb.Empty, error) // Get Scheduler and Scheduler cluster configuration GetScheduler(context.Context, *GetSchedulerRequest) (*Scheduler, error) - // Create scheduler configuration - CreateScheduler(context.Context, *CreateSchedulerRequest) (*Scheduler, error) // Update scheduler configuration UpdateScheduler(context.Context, *UpdateSchedulerRequest) (*Scheduler, error) // AddSchedulerClusterToSchedulerCluster add scheduler to scheduler cluster @@ -197,9 +172,6 @@ type UnimplementedManagerServer struct { func (UnimplementedManagerServer) GetCDN(context.Context, *GetCDNRequest) (*CDN, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCDN not implemented") } -func (UnimplementedManagerServer) CreateCDN(context.Context, *CreateCDNRequest) (*CDN, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCDN not implemented") -} func (UnimplementedManagerServer) UpdateCDN(context.Context, *UpdateCDNRequest) (*CDN, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateCDN not implemented") } @@ -209,9 +181,6 @@ func (UnimplementedManagerServer) AddCDNToCDNCluster(context.Context, *AddCDNToC func (UnimplementedManagerServer) GetScheduler(context.Context, *GetSchedulerRequest) (*Scheduler, error) { return nil, status.Errorf(codes.Unimplemented, "method GetScheduler not implemented") } -func (UnimplementedManagerServer) CreateScheduler(context.Context, *CreateSchedulerRequest) (*Scheduler, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateScheduler not implemented") -} func (UnimplementedManagerServer) UpdateScheduler(context.Context, *UpdateSchedulerRequest) (*Scheduler, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateScheduler not implemented") } @@ -234,7 +203,7 @@ type UnsafeManagerServer interface { } func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer) { - s.RegisterService(&_Manager_serviceDesc, srv) + s.RegisterService(&Manager_ServiceDesc, srv) } func _Manager_GetCDN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -255,24 +224,6 @@ func _Manager_GetCDN_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Manager_CreateCDN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCDNRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ManagerServer).CreateCDN(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/manager.Manager/CreateCDN", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagerServer).CreateCDN(ctx, req.(*CreateCDNRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Manager_UpdateCDN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateCDNRequest) if err := dec(in); err != nil { @@ -327,24 +278,6 @@ func _Manager_GetScheduler_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Manager_CreateScheduler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSchedulerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ManagerServer).CreateScheduler(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/manager.Manager/CreateScheduler", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagerServer).CreateScheduler(ctx, req.(*CreateSchedulerRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Manager_UpdateScheduler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSchedulerRequest) if err := dec(in); err != nil { @@ -425,7 +358,10 @@ func (x *managerKeepAliveServer) Recv() (*KeepAliveRequest, error) { return m, nil } -var _Manager_serviceDesc = grpc.ServiceDesc{ +// Manager_ServiceDesc is the grpc.ServiceDesc for Manager service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Manager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "manager.Manager", HandlerType: (*ManagerServer)(nil), Methods: []grpc.MethodDesc{ @@ -433,10 +369,6 @@ var _Manager_serviceDesc = grpc.ServiceDesc{ MethodName: "GetCDN", Handler: _Manager_GetCDN_Handler, }, - { - MethodName: "CreateCDN", - Handler: _Manager_CreateCDN_Handler, - }, { MethodName: "UpdateCDN", Handler: _Manager_UpdateCDN_Handler, @@ -449,10 +381,6 @@ var _Manager_serviceDesc = grpc.ServiceDesc{ MethodName: "GetScheduler", Handler: _Manager_GetScheduler_Handler, }, - { - MethodName: "CreateScheduler", - Handler: _Manager_CreateScheduler_Handler, - }, { MethodName: "UpdateScheduler", Handler: _Manager_UpdateScheduler_Handler, diff --git a/pkg/rpc/scheduler/scheduler_grpc.pb.go b/pkg/rpc/scheduler/scheduler_grpc.pb.go index 2ac2978136f..a1b1c4149e5 100644 --- a/pkg/rpc/scheduler/scheduler_grpc.pb.go +++ b/pkg/rpc/scheduler/scheduler_grpc.pb.go @@ -12,6 +12,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // SchedulerClient is the client API for Scheduler service. @@ -48,7 +49,7 @@ func (c *schedulerClient) RegisterPeerTask(ctx context.Context, in *PeerTaskRequ } func (c *schedulerClient) ReportPieceResult(ctx context.Context, opts ...grpc.CallOption) (Scheduler_ReportPieceResultClient, error) { - stream, err := c.cc.NewStream(ctx, &_Scheduler_serviceDesc.Streams[0], "/scheduler.Scheduler/ReportPieceResult", opts...) + stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[0], "/scheduler.Scheduler/ReportPieceResult", opts...) if err != nil { return nil, err } @@ -139,7 +140,7 @@ type UnsafeSchedulerServer interface { } func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer) { - s.RegisterService(&_Scheduler_serviceDesc, srv) + s.RegisterService(&Scheduler_ServiceDesc, srv) } func _Scheduler_RegisterPeerTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -222,7 +223,10 @@ func _Scheduler_LeaveTask_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -var _Scheduler_serviceDesc = grpc.ServiceDesc{ +// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Scheduler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "scheduler.Scheduler", HandlerType: (*SchedulerServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/scheduler/server/server.go b/scheduler/server/server.go index b93aee7d74c..3144b940036 100644 --- a/scheduler/server/server.go +++ b/scheduler/server/server.go @@ -175,7 +175,7 @@ func (s *Server) register(ctx context.Context) error { var scheduler *manager.Scheduler var err error - scheduler, err = s.managerClient.CreateScheduler(ctx, &manager.CreateSchedulerRequest{ + scheduler, err = s.managerClient.UpdateScheduler(ctx, &manager.UpdateSchedulerRequest{ SourceType: manager.SourceType_SCHEDULER_SOURCE, HostName: iputils.HostName, Ip: ip, @@ -184,21 +184,10 @@ func (s *Server) register(ctx context.Context) error { Location: location, }) if err != nil { - scheduler, err = s.managerClient.UpdateScheduler(ctx, &manager.UpdateSchedulerRequest{ - SourceType: manager.SourceType_SCHEDULER_SOURCE, - HostName: iputils.HostName, - Ip: ip, - Port: port, - Idc: idc, - Location: location, - }) - if err != nil { - logger.Warnf("update scheduler to manager failed %v", err) - return err - } - logger.Infof("update scheduler %s successfully", scheduler.HostName) + logger.Warnf("update scheduler %s to manager failed %v", scheduler.HostName, err) + return err } - logger.Infof("create scheduler %s successfully", scheduler.HostName) + logger.Infof("update scheduler %s to manager successfully", scheduler.HostName) schedulerClusterID := s.config.Manager.SchedulerClusterID if schedulerClusterID != 0 { @@ -206,7 +195,7 @@ func (s *Server) register(ctx context.Context) error { SchedulerId: scheduler.Id, SchedulerClusterId: schedulerClusterID, }); err != nil { - logger.Warnf("add scheduler to scheduler cluster failed %v", err) + logger.Warnf("add scheduler %s to scheduler cluster %s failed %v", scheduler.HostName, schedulerClusterID, err) return err } logger.Infof("add scheduler %s to scheduler cluster %s successfully", scheduler.HostName, schedulerClusterID) From 55ef5623bac80f25eb60b990a2c9954836034806 Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 19 Jul 2021 15:17:33 +0800 Subject: [PATCH 2/2] feat: mock Signed-off-by: Gaius --- scheduler/config/mocks/manager_client_mock.go | 72 +------------------ 1 file changed, 1 insertion(+), 71 deletions(-) diff --git a/scheduler/config/mocks/manager_client_mock.go b/scheduler/config/mocks/manager_client_mock.go index e758621d8c1..2550be5fec0 100644 --- a/scheduler/config/mocks/manager_client_mock.go +++ b/scheduler/config/mocks/manager_client_mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: ../../internal/rpc/manager/manager_grpc.pb.go +// Source: ../../pkg/rpc/manager/manager_grpc.pb.go // Package mocks is a generated GoMock package. package mocks @@ -78,46 +78,6 @@ func (mr *MockManagerClientMockRecorder) AddSchedulerClusterToSchedulerCluster(c return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSchedulerClusterToSchedulerCluster", reflect.TypeOf((*MockManagerClient)(nil).AddSchedulerClusterToSchedulerCluster), varargs...) } -// CreateCDN mocks base method. -func (m *MockManagerClient) CreateCDN(ctx context.Context, in *manager.CreateCDNRequest, opts ...grpc.CallOption) (*manager.CDN, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CreateCDN", varargs...) - ret0, _ := ret[0].(*manager.CDN) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateCDN indicates an expected call of CreateCDN. -func (mr *MockManagerClientMockRecorder) CreateCDN(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCDN", reflect.TypeOf((*MockManagerClient)(nil).CreateCDN), varargs...) -} - -// CreateScheduler mocks base method. -func (m *MockManagerClient) CreateScheduler(ctx context.Context, in *manager.CreateSchedulerRequest, opts ...grpc.CallOption) (*manager.Scheduler, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CreateScheduler", varargs...) - ret0, _ := ret[0].(*manager.Scheduler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateScheduler indicates an expected call of CreateScheduler. -func (mr *MockManagerClientMockRecorder) CreateScheduler(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateScheduler", reflect.TypeOf((*MockManagerClient)(nil).CreateScheduler), varargs...) -} - // GetCDN mocks base method. func (m *MockManagerClient) GetCDN(ctx context.Context, in *manager.GetCDNRequest, opts ...grpc.CallOption) (*manager.CDN, error) { m.ctrl.T.Helper() @@ -428,36 +388,6 @@ func (mr *MockManagerServerMockRecorder) AddSchedulerClusterToSchedulerCluster(a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSchedulerClusterToSchedulerCluster", reflect.TypeOf((*MockManagerServer)(nil).AddSchedulerClusterToSchedulerCluster), arg0, arg1) } -// CreateCDN mocks base method. -func (m *MockManagerServer) CreateCDN(arg0 context.Context, arg1 *manager.CreateCDNRequest) (*manager.CDN, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateCDN", arg0, arg1) - ret0, _ := ret[0].(*manager.CDN) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateCDN indicates an expected call of CreateCDN. -func (mr *MockManagerServerMockRecorder) CreateCDN(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCDN", reflect.TypeOf((*MockManagerServer)(nil).CreateCDN), arg0, arg1) -} - -// CreateScheduler mocks base method. -func (m *MockManagerServer) CreateScheduler(arg0 context.Context, arg1 *manager.CreateSchedulerRequest) (*manager.Scheduler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateScheduler", arg0, arg1) - ret0, _ := ret[0].(*manager.Scheduler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateScheduler indicates an expected call of CreateScheduler. -func (mr *MockManagerServerMockRecorder) CreateScheduler(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateScheduler", reflect.TypeOf((*MockManagerServer)(nil).CreateScheduler), arg0, arg1) -} - // GetCDN mocks base method. func (m *MockManagerServer) GetCDN(arg0 context.Context, arg1 *manager.GetCDNRequest) (*manager.CDN, error) { m.ctrl.T.Helper()