From 4f935512481a1e307d73487d3109665626c73664 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 22 Sep 2021 19:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=88=86?= =?UTF-8?q?=E7=BB=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/nodeconfigs/node_config.go | 8 +- pkg/rpc/pb/service_server.pb.go | 1 + pkg/rpc/pb/service_server_group.pb.go | 1275 ++++++++++++++++- pkg/rpc/protos/service_server.proto | 1 + pkg/rpc/protos/service_server_group.proto | 81 ++ pkg/serverconfigs/reverse_proxy_ref.go | 4 +- .../schedulingconfigs/scheduling_random.go | 2 +- .../scheduling_round_robin.go | 2 +- pkg/serverconfigs/server_address_group.go | 85 ++ ...p_test.go => server_address_group_test.go} | 10 +- pkg/serverconfigs/server_config.go | 20 + pkg/serverconfigs/server_group.go | 85 -- pkg/serverconfigs/server_group_config.go | 18 + 13 files changed, 1438 insertions(+), 154 deletions(-) create mode 100644 pkg/serverconfigs/server_address_group.go rename pkg/serverconfigs/{server_group_test.go => server_address_group_test.go} (64%) delete mode 100644 pkg/serverconfigs/server_group.go create mode 100644 pkg/serverconfigs/server_group_config.go diff --git a/pkg/nodeconfigs/node_config.go b/pkg/nodeconfigs/node_config.go index 71a4758..d606011 100644 --- a/pkg/nodeconfigs/node_config.go +++ b/pkg/nodeconfigs/node_config.go @@ -210,8 +210,8 @@ func (this *NodeConfig) Init() error { } // AvailableGroups 根据网络地址和协议分组 -func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerGroup { - groupMapping := map[string]*serverconfigs.ServerGroup{} // protocol://addr => Server Group +func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerAddressGroup { + groupMapping := map[string]*serverconfigs.ServerAddressGroup{} // protocol://addr => Server Group for _, server := range this.Servers { if !server.IsOk() || !server.IsOn { continue @@ -221,13 +221,13 @@ func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerGroup { if ok { group.Add(server) } else { - group = serverconfigs.NewServerGroup(addr) + group = serverconfigs.NewServerAddressGroup(addr) group.Add(server) } groupMapping[addr] = group } } - result := []*serverconfigs.ServerGroup{} + result := []*serverconfigs.ServerAddressGroup{} for _, group := range groupMapping { result = append(result, group) } diff --git a/pkg/rpc/pb/service_server.pb.go b/pkg/rpc/pb/service_server.pb.go index 7c0ea47..2207a99 100644 --- a/pkg/rpc/pb/service_server.pb.go +++ b/pkg/rpc/pb/service_server.pb.go @@ -791,6 +791,7 @@ func (x *UpdateServerWebRequest) GetWebId() int64 { return 0 } +// 修改服务的反向代理设置 type UpdateServerReverseProxyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pkg/rpc/pb/service_server_group.pb.go b/pkg/rpc/pb/service_server_group.pb.go index dd87630..fcdedfe 100644 --- a/pkg/rpc/pb/service_server_group.pb.go +++ b/pkg/rpc/pb/service_server_group.pb.go @@ -457,6 +457,602 @@ func (x *FindEnabledServerGroupResponse) GetServerGroup() *ServerGroup { return nil } +// 查找HTTP反向代理设置 +type FindAndInitServerGroupHTTPReverseProxyConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigRequest) Reset() { + *x = FindAndInitServerGroupHTTPReverseProxyConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupHTTPReverseProxyConfigRequest) ProtoMessage() {} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[9] + 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 FindAndInitServerGroupHTTPReverseProxyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupHTTPReverseProxyConfigRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{9} +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +type FindAndInitServerGroupHTTPReverseProxyConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyJSON []byte `protobuf:"bytes,1,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` + ReverseProxyRefJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyRefJSON,proto3" json:"reverseProxyRefJSON,omitempty"` +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigResponse) Reset() { + *x = FindAndInitServerGroupHTTPReverseProxyConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupHTTPReverseProxyConfigResponse) ProtoMessage() {} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_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 FindAndInitServerGroupHTTPReverseProxyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupHTTPReverseProxyConfigResponse) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{10} +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigResponse) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +func (x *FindAndInitServerGroupHTTPReverseProxyConfigResponse) GetReverseProxyRefJSON() []byte { + if x != nil { + return x.ReverseProxyRefJSON + } + return nil +} + +// 查找TCP反向代理设置 +type FindAndInitServerGroupTCPReverseProxyConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigRequest) Reset() { + *x = FindAndInitServerGroupTCPReverseProxyConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupTCPReverseProxyConfigRequest) ProtoMessage() {} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[11] + 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 FindAndInitServerGroupTCPReverseProxyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupTCPReverseProxyConfigRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{11} +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +type FindAndInitServerGroupTCPReverseProxyConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyJSON []byte `protobuf:"bytes,1,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` + ReverseProxyRefJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyRefJSON,proto3" json:"reverseProxyRefJSON,omitempty"` +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigResponse) Reset() { + *x = FindAndInitServerGroupTCPReverseProxyConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupTCPReverseProxyConfigResponse) ProtoMessage() {} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindAndInitServerGroupTCPReverseProxyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupTCPReverseProxyConfigResponse) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{12} +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigResponse) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +func (x *FindAndInitServerGroupTCPReverseProxyConfigResponse) GetReverseProxyRefJSON() []byte { + if x != nil { + return x.ReverseProxyRefJSON + } + return nil +} + +// 查找UDP反向代理设置 +type FindAndInitServerGroupUDPReverseProxyConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigRequest) Reset() { + *x = FindAndInitServerGroupUDPReverseProxyConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupUDPReverseProxyConfigRequest) ProtoMessage() {} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[13] + 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 FindAndInitServerGroupUDPReverseProxyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupUDPReverseProxyConfigRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{13} +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +type FindAndInitServerGroupUDPReverseProxyConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyJSON []byte `protobuf:"bytes,1,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` + ReverseProxyRefJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyRefJSON,proto3" json:"reverseProxyRefJSON,omitempty"` +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigResponse) Reset() { + *x = FindAndInitServerGroupUDPReverseProxyConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAndInitServerGroupUDPReverseProxyConfigResponse) ProtoMessage() {} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[14] + 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 FindAndInitServerGroupUDPReverseProxyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindAndInitServerGroupUDPReverseProxyConfigResponse) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{14} +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigResponse) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +func (x *FindAndInitServerGroupUDPReverseProxyConfigResponse) GetReverseProxyRefJSON() []byte { + if x != nil { + return x.ReverseProxyRefJSON + } + return nil +} + +// 修改分组的HTTP反向代理设置 +type UpdateServerGroupHTTPReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` + ReverseProxyJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` +} + +func (x *UpdateServerGroupHTTPReverseProxyRequest) Reset() { + *x = UpdateServerGroupHTTPReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerGroupHTTPReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerGroupHTTPReverseProxyRequest) ProtoMessage() {} + +func (x *UpdateServerGroupHTTPReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[15] + 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 UpdateServerGroupHTTPReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerGroupHTTPReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{15} +} + +func (x *UpdateServerGroupHTTPReverseProxyRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +func (x *UpdateServerGroupHTTPReverseProxyRequest) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +// 修改分组的TCP反向代理设置 +type UpdateServerGroupTCPReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` + ReverseProxyJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` +} + +func (x *UpdateServerGroupTCPReverseProxyRequest) Reset() { + *x = UpdateServerGroupTCPReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerGroupTCPReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerGroupTCPReverseProxyRequest) ProtoMessage() {} + +func (x *UpdateServerGroupTCPReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[16] + 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 UpdateServerGroupTCPReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerGroupTCPReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateServerGroupTCPReverseProxyRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +func (x *UpdateServerGroupTCPReverseProxyRequest) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +// 修改分组的UDP反向代理设置 +type UpdateServerGroupUDPReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` + ReverseProxyJSON []byte `protobuf:"bytes,2,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` +} + +func (x *UpdateServerGroupUDPReverseProxyRequest) Reset() { + *x = UpdateServerGroupUDPReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerGroupUDPReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerGroupUDPReverseProxyRequest) ProtoMessage() {} + +func (x *UpdateServerGroupUDPReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[17] + 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 UpdateServerGroupUDPReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerGroupUDPReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{17} +} + +func (x *UpdateServerGroupUDPReverseProxyRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +func (x *UpdateServerGroupUDPReverseProxyRequest) GetReverseProxyJSON() []byte { + if x != nil { + return x.ReverseProxyJSON + } + return nil +} + +// 取得分组的配置概要信息 +type FindEnabledServerGroupConfigInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerGroupId int64 `protobuf:"varint,1,opt,name=serverGroupId,proto3" json:"serverGroupId,omitempty"` + ServerId int64 `protobuf:"varint,2,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *FindEnabledServerGroupConfigInfoRequest) Reset() { + *x = FindEnabledServerGroupConfigInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledServerGroupConfigInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledServerGroupConfigInfoRequest) ProtoMessage() {} + +func (x *FindEnabledServerGroupConfigInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[18] + 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 FindEnabledServerGroupConfigInfoRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledServerGroupConfigInfoRequest) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{18} +} + +func (x *FindEnabledServerGroupConfigInfoRequest) GetServerGroupId() int64 { + if x != nil { + return x.ServerGroupId + } + return 0 +} + +func (x *FindEnabledServerGroupConfigInfoRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +type FindEnabledServerGroupConfigInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HasHTTPReverseProxy bool `protobuf:"varint,1,opt,name=hasHTTPReverseProxy,proto3" json:"hasHTTPReverseProxy,omitempty"` + HasTCPReverseProxy bool `protobuf:"varint,2,opt,name=hasTCPReverseProxy,proto3" json:"hasTCPReverseProxy,omitempty"` + HasUDPReverseProxy bool `protobuf:"varint,3,opt,name=hasUDPReverseProxy,proto3" json:"hasUDPReverseProxy,omitempty"` +} + +func (x *FindEnabledServerGroupConfigInfoResponse) Reset() { + *x = FindEnabledServerGroupConfigInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_group_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledServerGroupConfigInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledServerGroupConfigInfoResponse) ProtoMessage() {} + +func (x *FindEnabledServerGroupConfigInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_group_proto_msgTypes[19] + 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 FindEnabledServerGroupConfigInfoResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledServerGroupConfigInfoResponse) Descriptor() ([]byte, []int) { + return file_service_server_group_proto_rawDescGZIP(), []int{19} +} + +func (x *FindEnabledServerGroupConfigInfoResponse) GetHasHTTPReverseProxy() bool { + if x != nil { + return x.HasHTTPReverseProxy + } + return false +} + +func (x *FindEnabledServerGroupConfigInfoResponse) GetHasTCPReverseProxy() bool { + if x != nil { + return x.HasTCPReverseProxy + } + return false +} + +func (x *FindEnabledServerGroupConfigInfoResponse) GetHasUDPReverseProxy() bool { + if x != nil { + return x.HasUDPReverseProxy + } + return false +} + var File_service_server_group_proto protoreflect.FileDescriptor var file_service_server_group_proto_rawDesc = []byte{ @@ -504,41 +1100,185 @@ var file_service_server_group_proto_rawDesc = []byte{ 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x89, 0x04, - 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x5b, 0x0a, + 0x33, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x34, 0x46, + 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, + 0x30, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, + 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, + 0x4e, 0x22, 0x5a, 0x0a, 0x32, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x93, 0x01, + 0x0a, 0x33, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, + 0x4e, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x66, 0x4a, + 0x53, 0x4f, 0x4e, 0x22, 0x5a, 0x0a, 0x32, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, + 0x93, 0x01, 0x0a, 0x33, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, + 0x53, 0x4f, 0x4e, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x52, 0x65, 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, + 0x66, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x7c, 0x0a, 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, + 0x53, 0x4f, 0x4e, 0x22, 0x7b, 0x0a, 0x27, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, + 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, + 0x22, 0x7b, 0x0a, 0x27, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x6b, 0x0a, + 0x27, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0xbc, 0x01, 0x0a, 0x28, 0x46, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x48, 0x54, + 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x68, 0x61, 0x73, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x68, 0x61, 0x73, + 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x68, 0x61, 0x73, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x68, 0x61, 0x73, + 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x68, 0x61, 0x73, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x32, 0x93, 0x0b, 0x0a, 0x12, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x50, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x1a, - 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, + 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x1a, 0x66, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x2c, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6e, + 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x38, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x2b, 0x66, 0x69, + 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x2b, 0x66, + 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x64, 0x49, + 0x6e, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, + 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x21, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x12, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, + 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x43, 0x50, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x5f, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x44, 0x50, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x7d, 0x0a, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, - 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -553,37 +1293,62 @@ func file_service_server_group_proto_rawDescGZIP() []byte { return file_service_server_group_proto_rawDescData } -var file_service_server_group_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_service_server_group_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_service_server_group_proto_goTypes = []interface{}{ - (*CreateServerGroupRequest)(nil), // 0: pb.CreateServerGroupRequest - (*CreateServerGroupResponse)(nil), // 1: pb.CreateServerGroupResponse - (*UpdateServerGroupRequest)(nil), // 2: pb.UpdateServerGroupRequest - (*DeleteServerGroupRequest)(nil), // 3: pb.DeleteServerGroupRequest - (*FindAllEnabledServerGroupsRequest)(nil), // 4: pb.FindAllEnabledServerGroupsRequest - (*FindAllEnabledServerGroupsResponse)(nil), // 5: pb.FindAllEnabledServerGroupsResponse - (*UpdateServerGroupOrdersRequest)(nil), // 6: pb.UpdateServerGroupOrdersRequest - (*FindEnabledServerGroupRequest)(nil), // 7: pb.FindEnabledServerGroupRequest - (*FindEnabledServerGroupResponse)(nil), // 8: pb.FindEnabledServerGroupResponse - (*ServerGroup)(nil), // 9: pb.ServerGroup - (*RPCSuccess)(nil), // 10: pb.RPCSuccess + (*CreateServerGroupRequest)(nil), // 0: pb.CreateServerGroupRequest + (*CreateServerGroupResponse)(nil), // 1: pb.CreateServerGroupResponse + (*UpdateServerGroupRequest)(nil), // 2: pb.UpdateServerGroupRequest + (*DeleteServerGroupRequest)(nil), // 3: pb.DeleteServerGroupRequest + (*FindAllEnabledServerGroupsRequest)(nil), // 4: pb.FindAllEnabledServerGroupsRequest + (*FindAllEnabledServerGroupsResponse)(nil), // 5: pb.FindAllEnabledServerGroupsResponse + (*UpdateServerGroupOrdersRequest)(nil), // 6: pb.UpdateServerGroupOrdersRequest + (*FindEnabledServerGroupRequest)(nil), // 7: pb.FindEnabledServerGroupRequest + (*FindEnabledServerGroupResponse)(nil), // 8: pb.FindEnabledServerGroupResponse + (*FindAndInitServerGroupHTTPReverseProxyConfigRequest)(nil), // 9: pb.FindAndInitServerGroupHTTPReverseProxyConfigRequest + (*FindAndInitServerGroupHTTPReverseProxyConfigResponse)(nil), // 10: pb.FindAndInitServerGroupHTTPReverseProxyConfigResponse + (*FindAndInitServerGroupTCPReverseProxyConfigRequest)(nil), // 11: pb.FindAndInitServerGroupTCPReverseProxyConfigRequest + (*FindAndInitServerGroupTCPReverseProxyConfigResponse)(nil), // 12: pb.FindAndInitServerGroupTCPReverseProxyConfigResponse + (*FindAndInitServerGroupUDPReverseProxyConfigRequest)(nil), // 13: pb.FindAndInitServerGroupUDPReverseProxyConfigRequest + (*FindAndInitServerGroupUDPReverseProxyConfigResponse)(nil), // 14: pb.FindAndInitServerGroupUDPReverseProxyConfigResponse + (*UpdateServerGroupHTTPReverseProxyRequest)(nil), // 15: pb.UpdateServerGroupHTTPReverseProxyRequest + (*UpdateServerGroupTCPReverseProxyRequest)(nil), // 16: pb.UpdateServerGroupTCPReverseProxyRequest + (*UpdateServerGroupUDPReverseProxyRequest)(nil), // 17: pb.UpdateServerGroupUDPReverseProxyRequest + (*FindEnabledServerGroupConfigInfoRequest)(nil), // 18: pb.FindEnabledServerGroupConfigInfoRequest + (*FindEnabledServerGroupConfigInfoResponse)(nil), // 19: pb.FindEnabledServerGroupConfigInfoResponse + (*ServerGroup)(nil), // 20: pb.ServerGroup + (*RPCSuccess)(nil), // 21: pb.RPCSuccess } var file_service_server_group_proto_depIdxs = []int32{ - 9, // 0: pb.FindAllEnabledServerGroupsResponse.serverGroups:type_name -> pb.ServerGroup - 9, // 1: pb.FindEnabledServerGroupResponse.serverGroup:type_name -> pb.ServerGroup + 20, // 0: pb.FindAllEnabledServerGroupsResponse.serverGroups:type_name -> pb.ServerGroup + 20, // 1: pb.FindEnabledServerGroupResponse.serverGroup:type_name -> pb.ServerGroup 0, // 2: pb.ServerGroupService.createServerGroup:input_type -> pb.CreateServerGroupRequest 2, // 3: pb.ServerGroupService.updateServerGroup:input_type -> pb.UpdateServerGroupRequest 3, // 4: pb.ServerGroupService.deleteServerGroup:input_type -> pb.DeleteServerGroupRequest 4, // 5: pb.ServerGroupService.findAllEnabledServerGroups:input_type -> pb.FindAllEnabledServerGroupsRequest 6, // 6: pb.ServerGroupService.updateServerGroupOrders:input_type -> pb.UpdateServerGroupOrdersRequest 7, // 7: pb.ServerGroupService.findEnabledServerGroup:input_type -> pb.FindEnabledServerGroupRequest - 1, // 8: pb.ServerGroupService.createServerGroup:output_type -> pb.CreateServerGroupResponse - 10, // 9: pb.ServerGroupService.updateServerGroup:output_type -> pb.RPCSuccess - 10, // 10: pb.ServerGroupService.deleteServerGroup:output_type -> pb.RPCSuccess - 5, // 11: pb.ServerGroupService.findAllEnabledServerGroups:output_type -> pb.FindAllEnabledServerGroupsResponse - 10, // 12: pb.ServerGroupService.updateServerGroupOrders:output_type -> pb.RPCSuccess - 8, // 13: pb.ServerGroupService.findEnabledServerGroup:output_type -> pb.FindEnabledServerGroupResponse - 8, // [8:14] is the sub-list for method output_type - 2, // [2:8] is the sub-list for method input_type + 9, // 8: pb.ServerGroupService.findAndInitServerGroupHTTPReverseProxyConfig:input_type -> pb.FindAndInitServerGroupHTTPReverseProxyConfigRequest + 11, // 9: pb.ServerGroupService.findAndInitServerGroupTCPReverseProxyConfig:input_type -> pb.FindAndInitServerGroupTCPReverseProxyConfigRequest + 13, // 10: pb.ServerGroupService.findAndInitServerGroupUDPReverseProxyConfig:input_type -> pb.FindAndInitServerGroupUDPReverseProxyConfigRequest + 15, // 11: pb.ServerGroupService.updateServerGroupHTTPReverseProxy:input_type -> pb.UpdateServerGroupHTTPReverseProxyRequest + 16, // 12: pb.ServerGroupService.updateServerGroupTCPReverseProxy:input_type -> pb.UpdateServerGroupTCPReverseProxyRequest + 17, // 13: pb.ServerGroupService.updateServerGroupUDPReverseProxy:input_type -> pb.UpdateServerGroupUDPReverseProxyRequest + 18, // 14: pb.ServerGroupService.findEnabledServerGroupConfigInfo:input_type -> pb.FindEnabledServerGroupConfigInfoRequest + 1, // 15: pb.ServerGroupService.createServerGroup:output_type -> pb.CreateServerGroupResponse + 21, // 16: pb.ServerGroupService.updateServerGroup:output_type -> pb.RPCSuccess + 21, // 17: pb.ServerGroupService.deleteServerGroup:output_type -> pb.RPCSuccess + 5, // 18: pb.ServerGroupService.findAllEnabledServerGroups:output_type -> pb.FindAllEnabledServerGroupsResponse + 21, // 19: pb.ServerGroupService.updateServerGroupOrders:output_type -> pb.RPCSuccess + 8, // 20: pb.ServerGroupService.findEnabledServerGroup:output_type -> pb.FindEnabledServerGroupResponse + 10, // 21: pb.ServerGroupService.findAndInitServerGroupHTTPReverseProxyConfig:output_type -> pb.FindAndInitServerGroupHTTPReverseProxyConfigResponse + 12, // 22: pb.ServerGroupService.findAndInitServerGroupTCPReverseProxyConfig:output_type -> pb.FindAndInitServerGroupTCPReverseProxyConfigResponse + 14, // 23: pb.ServerGroupService.findAndInitServerGroupUDPReverseProxyConfig:output_type -> pb.FindAndInitServerGroupUDPReverseProxyConfigResponse + 21, // 24: pb.ServerGroupService.updateServerGroupHTTPReverseProxy:output_type -> pb.RPCSuccess + 21, // 25: pb.ServerGroupService.updateServerGroupTCPReverseProxy:output_type -> pb.RPCSuccess + 21, // 26: pb.ServerGroupService.updateServerGroupUDPReverseProxy:output_type -> pb.RPCSuccess + 19, // 27: pb.ServerGroupService.findEnabledServerGroupConfigInfo:output_type -> pb.FindEnabledServerGroupConfigInfoResponse + 15, // [15:28] is the sub-list for method output_type + 2, // [2:15] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -705,6 +1470,138 @@ func file_service_server_group_proto_init() { return nil } } + file_service_server_group_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupHTTPReverseProxyConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupHTTPReverseProxyConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupTCPReverseProxyConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupTCPReverseProxyConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupUDPReverseProxyConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAndInitServerGroupUDPReverseProxyConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerGroupHTTPReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerGroupTCPReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerGroupUDPReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledServerGroupConfigInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_group_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledServerGroupConfigInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -712,7 +1609,7 @@ func file_service_server_group_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_server_group_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, @@ -750,6 +1647,20 @@ type ServerGroupServiceClient interface { UpdateServerGroupOrders(ctx context.Context, in *UpdateServerGroupOrdersRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 查找单个分组信息 FindEnabledServerGroup(ctx context.Context, in *FindEnabledServerGroupRequest, opts ...grpc.CallOption) (*FindEnabledServerGroupResponse, error) + // 查找HTTP反向代理设置 + FindAndInitServerGroupHTTPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupHTTPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupHTTPReverseProxyConfigResponse, error) + // 查找TCP反向代理设置 + FindAndInitServerGroupTCPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupTCPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupTCPReverseProxyConfigResponse, error) + // 查找UDP反向代理设置 + FindAndInitServerGroupUDPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupUDPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupUDPReverseProxyConfigResponse, error) + // 修改分组的HTTP反向代理设置 + UpdateServerGroupHTTPReverseProxy(ctx context.Context, in *UpdateServerGroupHTTPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 修改分组的TCP反向代理设置 + UpdateServerGroupTCPReverseProxy(ctx context.Context, in *UpdateServerGroupTCPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 修改分组的UDP反向代理设置 + UpdateServerGroupUDPReverseProxy(ctx context.Context, in *UpdateServerGroupUDPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 取得分组的配置概要信息 + FindEnabledServerGroupConfigInfo(ctx context.Context, in *FindEnabledServerGroupConfigInfoRequest, opts ...grpc.CallOption) (*FindEnabledServerGroupConfigInfoResponse, error) } type serverGroupServiceClient struct { @@ -814,6 +1725,69 @@ func (c *serverGroupServiceClient) FindEnabledServerGroup(ctx context.Context, i return out, nil } +func (c *serverGroupServiceClient) FindAndInitServerGroupHTTPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupHTTPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupHTTPReverseProxyConfigResponse, error) { + out := new(FindAndInitServerGroupHTTPReverseProxyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/findAndInitServerGroupHTTPReverseProxyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) FindAndInitServerGroupTCPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupTCPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupTCPReverseProxyConfigResponse, error) { + out := new(FindAndInitServerGroupTCPReverseProxyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/findAndInitServerGroupTCPReverseProxyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) FindAndInitServerGroupUDPReverseProxyConfig(ctx context.Context, in *FindAndInitServerGroupUDPReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindAndInitServerGroupUDPReverseProxyConfigResponse, error) { + out := new(FindAndInitServerGroupUDPReverseProxyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/findAndInitServerGroupUDPReverseProxyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) UpdateServerGroupHTTPReverseProxy(ctx context.Context, in *UpdateServerGroupHTTPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/updateServerGroupHTTPReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) UpdateServerGroupTCPReverseProxy(ctx context.Context, in *UpdateServerGroupTCPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/updateServerGroupTCPReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) UpdateServerGroupUDPReverseProxy(ctx context.Context, in *UpdateServerGroupUDPReverseProxyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/updateServerGroupUDPReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverGroupServiceClient) FindEnabledServerGroupConfigInfo(ctx context.Context, in *FindEnabledServerGroupConfigInfoRequest, opts ...grpc.CallOption) (*FindEnabledServerGroupConfigInfoResponse, error) { + out := new(FindEnabledServerGroupConfigInfoResponse) + err := c.cc.Invoke(ctx, "/pb.ServerGroupService/findEnabledServerGroupConfigInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServerGroupServiceServer is the server API for ServerGroupService service. type ServerGroupServiceServer interface { // 创建分组 @@ -828,6 +1802,20 @@ type ServerGroupServiceServer interface { UpdateServerGroupOrders(context.Context, *UpdateServerGroupOrdersRequest) (*RPCSuccess, error) // 查找单个分组信息 FindEnabledServerGroup(context.Context, *FindEnabledServerGroupRequest) (*FindEnabledServerGroupResponse, error) + // 查找HTTP反向代理设置 + FindAndInitServerGroupHTTPReverseProxyConfig(context.Context, *FindAndInitServerGroupHTTPReverseProxyConfigRequest) (*FindAndInitServerGroupHTTPReverseProxyConfigResponse, error) + // 查找TCP反向代理设置 + FindAndInitServerGroupTCPReverseProxyConfig(context.Context, *FindAndInitServerGroupTCPReverseProxyConfigRequest) (*FindAndInitServerGroupTCPReverseProxyConfigResponse, error) + // 查找UDP反向代理设置 + FindAndInitServerGroupUDPReverseProxyConfig(context.Context, *FindAndInitServerGroupUDPReverseProxyConfigRequest) (*FindAndInitServerGroupUDPReverseProxyConfigResponse, error) + // 修改分组的HTTP反向代理设置 + UpdateServerGroupHTTPReverseProxy(context.Context, *UpdateServerGroupHTTPReverseProxyRequest) (*RPCSuccess, error) + // 修改分组的TCP反向代理设置 + UpdateServerGroupTCPReverseProxy(context.Context, *UpdateServerGroupTCPReverseProxyRequest) (*RPCSuccess, error) + // 修改分组的UDP反向代理设置 + UpdateServerGroupUDPReverseProxy(context.Context, *UpdateServerGroupUDPReverseProxyRequest) (*RPCSuccess, error) + // 取得分组的配置概要信息 + FindEnabledServerGroupConfigInfo(context.Context, *FindEnabledServerGroupConfigInfoRequest) (*FindEnabledServerGroupConfigInfoResponse, error) } // UnimplementedServerGroupServiceServer can be embedded to have forward compatible implementations. @@ -852,6 +1840,27 @@ func (*UnimplementedServerGroupServiceServer) UpdateServerGroupOrders(context.Co func (*UnimplementedServerGroupServiceServer) FindEnabledServerGroup(context.Context, *FindEnabledServerGroupRequest) (*FindEnabledServerGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindEnabledServerGroup not implemented") } +func (*UnimplementedServerGroupServiceServer) FindAndInitServerGroupHTTPReverseProxyConfig(context.Context, *FindAndInitServerGroupHTTPReverseProxyConfigRequest) (*FindAndInitServerGroupHTTPReverseProxyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAndInitServerGroupHTTPReverseProxyConfig not implemented") +} +func (*UnimplementedServerGroupServiceServer) FindAndInitServerGroupTCPReverseProxyConfig(context.Context, *FindAndInitServerGroupTCPReverseProxyConfigRequest) (*FindAndInitServerGroupTCPReverseProxyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAndInitServerGroupTCPReverseProxyConfig not implemented") +} +func (*UnimplementedServerGroupServiceServer) FindAndInitServerGroupUDPReverseProxyConfig(context.Context, *FindAndInitServerGroupUDPReverseProxyConfigRequest) (*FindAndInitServerGroupUDPReverseProxyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAndInitServerGroupUDPReverseProxyConfig not implemented") +} +func (*UnimplementedServerGroupServiceServer) UpdateServerGroupHTTPReverseProxy(context.Context, *UpdateServerGroupHTTPReverseProxyRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerGroupHTTPReverseProxy not implemented") +} +func (*UnimplementedServerGroupServiceServer) UpdateServerGroupTCPReverseProxy(context.Context, *UpdateServerGroupTCPReverseProxyRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerGroupTCPReverseProxy not implemented") +} +func (*UnimplementedServerGroupServiceServer) UpdateServerGroupUDPReverseProxy(context.Context, *UpdateServerGroupUDPReverseProxyRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerGroupUDPReverseProxy not implemented") +} +func (*UnimplementedServerGroupServiceServer) FindEnabledServerGroupConfigInfo(context.Context, *FindEnabledServerGroupConfigInfoRequest) (*FindEnabledServerGroupConfigInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledServerGroupConfigInfo not implemented") +} func RegisterServerGroupServiceServer(s *grpc.Server, srv ServerGroupServiceServer) { s.RegisterService(&_ServerGroupService_serviceDesc, srv) @@ -965,6 +1974,132 @@ func _ServerGroupService_FindEnabledServerGroup_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } +func _ServerGroupService_FindAndInitServerGroupHTTPReverseProxyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAndInitServerGroupHTTPReverseProxyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupHTTPReverseProxyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/FindAndInitServerGroupHTTPReverseProxyConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupHTTPReverseProxyConfig(ctx, req.(*FindAndInitServerGroupHTTPReverseProxyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_FindAndInitServerGroupTCPReverseProxyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAndInitServerGroupTCPReverseProxyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupTCPReverseProxyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/FindAndInitServerGroupTCPReverseProxyConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupTCPReverseProxyConfig(ctx, req.(*FindAndInitServerGroupTCPReverseProxyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_FindAndInitServerGroupUDPReverseProxyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAndInitServerGroupUDPReverseProxyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupUDPReverseProxyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/FindAndInitServerGroupUDPReverseProxyConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).FindAndInitServerGroupUDPReverseProxyConfig(ctx, req.(*FindAndInitServerGroupUDPReverseProxyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_UpdateServerGroupHTTPReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerGroupHTTPReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).UpdateServerGroupHTTPReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/UpdateServerGroupHTTPReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).UpdateServerGroupHTTPReverseProxy(ctx, req.(*UpdateServerGroupHTTPReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_UpdateServerGroupTCPReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerGroupTCPReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).UpdateServerGroupTCPReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/UpdateServerGroupTCPReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).UpdateServerGroupTCPReverseProxy(ctx, req.(*UpdateServerGroupTCPReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_UpdateServerGroupUDPReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerGroupUDPReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).UpdateServerGroupUDPReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/UpdateServerGroupUDPReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).UpdateServerGroupUDPReverseProxy(ctx, req.(*UpdateServerGroupUDPReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerGroupService_FindEnabledServerGroupConfigInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledServerGroupConfigInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerGroupServiceServer).FindEnabledServerGroupConfigInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerGroupService/FindEnabledServerGroupConfigInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerGroupServiceServer).FindEnabledServerGroupConfigInfo(ctx, req.(*FindEnabledServerGroupConfigInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _ServerGroupService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.ServerGroupService", HandlerType: (*ServerGroupServiceServer)(nil), @@ -993,6 +2128,34 @@ var _ServerGroupService_serviceDesc = grpc.ServiceDesc{ MethodName: "findEnabledServerGroup", Handler: _ServerGroupService_FindEnabledServerGroup_Handler, }, + { + MethodName: "findAndInitServerGroupHTTPReverseProxyConfig", + Handler: _ServerGroupService_FindAndInitServerGroupHTTPReverseProxyConfig_Handler, + }, + { + MethodName: "findAndInitServerGroupTCPReverseProxyConfig", + Handler: _ServerGroupService_FindAndInitServerGroupTCPReverseProxyConfig_Handler, + }, + { + MethodName: "findAndInitServerGroupUDPReverseProxyConfig", + Handler: _ServerGroupService_FindAndInitServerGroupUDPReverseProxyConfig_Handler, + }, + { + MethodName: "updateServerGroupHTTPReverseProxy", + Handler: _ServerGroupService_UpdateServerGroupHTTPReverseProxy_Handler, + }, + { + MethodName: "updateServerGroupTCPReverseProxy", + Handler: _ServerGroupService_UpdateServerGroupTCPReverseProxy_Handler, + }, + { + MethodName: "updateServerGroupUDPReverseProxy", + Handler: _ServerGroupService_UpdateServerGroupUDPReverseProxy_Handler, + }, + { + MethodName: "findEnabledServerGroupConfigInfo", + Handler: _ServerGroupService_FindEnabledServerGroupConfigInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_server_group.proto", diff --git a/pkg/rpc/protos/service_server.proto b/pkg/rpc/protos/service_server.proto index ca06a9f..2117112 100644 --- a/pkg/rpc/protos/service_server.proto +++ b/pkg/rpc/protos/service_server.proto @@ -199,6 +199,7 @@ message UpdateServerWebRequest { int64 webId = 2; } +// 修改服务的反向代理设置 message UpdateServerReverseProxyRequest { int64 serverId = 1; bytes reverseProxyJSON = 2; diff --git a/pkg/rpc/protos/service_server_group.proto b/pkg/rpc/protos/service_server_group.proto index 112a89d..d43b659 100644 --- a/pkg/rpc/protos/service_server_group.proto +++ b/pkg/rpc/protos/service_server_group.proto @@ -25,6 +25,27 @@ service ServerGroupService { // 查找单个分组信息 rpc findEnabledServerGroup (FindEnabledServerGroupRequest) returns (FindEnabledServerGroupResponse); + + // 查找HTTP反向代理设置 + rpc findAndInitServerGroupHTTPReverseProxyConfig (FindAndInitServerGroupHTTPReverseProxyConfigRequest) returns (FindAndInitServerGroupHTTPReverseProxyConfigResponse); + + // 查找TCP反向代理设置 + rpc findAndInitServerGroupTCPReverseProxyConfig (FindAndInitServerGroupTCPReverseProxyConfigRequest) returns (FindAndInitServerGroupTCPReverseProxyConfigResponse); + + // 查找UDP反向代理设置 + rpc findAndInitServerGroupUDPReverseProxyConfig (FindAndInitServerGroupUDPReverseProxyConfigRequest) returns (FindAndInitServerGroupUDPReverseProxyConfigResponse); + + // 修改分组的HTTP反向代理设置 + rpc updateServerGroupHTTPReverseProxy (UpdateServerGroupHTTPReverseProxyRequest) returns (RPCSuccess); + + // 修改分组的TCP反向代理设置 + rpc updateServerGroupTCPReverseProxy (UpdateServerGroupTCPReverseProxyRequest) returns (RPCSuccess); + + // 修改分组的UDP反向代理设置 + rpc updateServerGroupUDPReverseProxy (UpdateServerGroupUDPReverseProxyRequest) returns (RPCSuccess); + + // 取得分组的配置概要信息 + rpc findEnabledServerGroupConfigInfo (FindEnabledServerGroupConfigInfoRequest) returns (FindEnabledServerGroupConfigInfoResponse); } // 创建分组 @@ -67,4 +88,64 @@ message FindEnabledServerGroupRequest { message FindEnabledServerGroupResponse { ServerGroup serverGroup = 1; +} + +// 查找HTTP反向代理设置 +message FindAndInitServerGroupHTTPReverseProxyConfigRequest { + int64 serverGroupId = 1; +} + +message FindAndInitServerGroupHTTPReverseProxyConfigResponse { + bytes reverseProxyJSON = 1; + bytes reverseProxyRefJSON = 2; +} + +// 查找TCP反向代理设置 +message FindAndInitServerGroupTCPReverseProxyConfigRequest { + int64 serverGroupId = 1; +} + +message FindAndInitServerGroupTCPReverseProxyConfigResponse { + bytes reverseProxyJSON = 1; + bytes reverseProxyRefJSON = 2; +} + +// 查找UDP反向代理设置 +message FindAndInitServerGroupUDPReverseProxyConfigRequest { + int64 serverGroupId = 1; +} + +message FindAndInitServerGroupUDPReverseProxyConfigResponse { + bytes reverseProxyJSON = 1; + bytes reverseProxyRefJSON = 2; +} + +// 修改分组的HTTP反向代理设置 +message UpdateServerGroupHTTPReverseProxyRequest { + int64 serverGroupId = 1; + bytes reverseProxyJSON = 2; +} + +// 修改分组的TCP反向代理设置 +message UpdateServerGroupTCPReverseProxyRequest { + int64 serverGroupId = 1; + bytes reverseProxyJSON = 2; +} + +// 修改分组的UDP反向代理设置 +message UpdateServerGroupUDPReverseProxyRequest { + int64 serverGroupId = 1; + bytes reverseProxyJSON = 2; +} + +// 取得分组的配置概要信息 +message FindEnabledServerGroupConfigInfoRequest { + int64 serverGroupId = 1; + int64 serverId = 2; +} + +message FindEnabledServerGroupConfigInfoResponse { + bool hasHTTPReverseProxy = 1; + bool hasTCPReverseProxy = 2; + bool hasUDPReverseProxy = 3; } \ No newline at end of file diff --git a/pkg/serverconfigs/reverse_proxy_ref.go b/pkg/serverconfigs/reverse_proxy_ref.go index 445f189..5604c23 100644 --- a/pkg/serverconfigs/reverse_proxy_ref.go +++ b/pkg/serverconfigs/reverse_proxy_ref.go @@ -1,13 +1,13 @@ package serverconfigs -// 反向代理引用 +// ReverseProxyRef 反向代理引用 type ReverseProxyRef struct { IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖 IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用 ReverseProxyId int64 `yaml:"reverseProxyId" json:"reverseProxyId"` // 反向代理ID } -// 初始化 +// Init 初始化 func (this *ReverseProxyRef) Init() error { return nil } diff --git a/pkg/serverconfigs/schedulingconfigs/scheduling_random.go b/pkg/serverconfigs/schedulingconfigs/scheduling_random.go index 738f412..99a6bee 100644 --- a/pkg/serverconfigs/schedulingconfigs/scheduling_random.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_random.go @@ -73,6 +73,6 @@ func (this *RandomScheduling) Summary() maps.Map { "code": "random", "name": "Random随机算法", "description": "根据权重设置随机分配源站", - "networks": []string{"http", "tcp"}, + "networks": []string{"http", "tcp", "udp", "unix"}, } } diff --git a/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go index d493c8a..516e6e2 100644 --- a/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go @@ -75,6 +75,6 @@ func (this *RoundRobinScheduling) Summary() maps.Map { "code": "roundRobin", "name": "RoundRobin轮询算法", "description": "根据权重,依次分配源站", - "networks": []string{"http", "tcp"}, + "networks": []string{"http", "tcp", "udp", "unix"}, } } diff --git a/pkg/serverconfigs/server_address_group.go b/pkg/serverconfigs/server_address_group.go new file mode 100644 index 0000000..a90b1da --- /dev/null +++ b/pkg/serverconfigs/server_address_group.go @@ -0,0 +1,85 @@ +package serverconfigs + +import "strings" + +type ServerAddressGroup struct { + fullAddr string + Servers []*ServerConfig +} + +func NewServerAddressGroup(fullAddr string) *ServerAddressGroup { + return &ServerAddressGroup{fullAddr: fullAddr} +} + +// Add 添加服务 +func (this *ServerAddressGroup) Add(server *ServerConfig) { + this.Servers = append(this.Servers, server) +} + +// FullAddr 获取完整的地址 +func (this *ServerAddressGroup) FullAddr() string { + return this.fullAddr +} + +// Protocol 获取当前分组的协议 +func (this *ServerAddressGroup) Protocol() Protocol { + for _, p := range AllProtocols() { + if strings.HasPrefix(this.fullAddr, p.String()+":") { + return p + } + } + return ProtocolHTTP +} + +// Addr 获取当前分组的地址 +func (this *ServerAddressGroup) Addr() string { + protocol := this.Protocol() + if protocol == ProtocolUnix { + return strings.TrimPrefix(this.fullAddr, protocol.String()+":") + } + return strings.TrimPrefix(this.fullAddr, protocol.String()+"://") +} + +// IsHTTP 判断当前分组是否为HTTP +func (this *ServerAddressGroup) IsHTTP() bool { + p := this.Protocol() + return p == ProtocolHTTP || p == ProtocolHTTP4 || p == ProtocolHTTP6 +} + +// IsHTTPS 判断当前分组是否为HTTPS +func (this *ServerAddressGroup) IsHTTPS() bool { + p := this.Protocol() + return p == ProtocolHTTPS || p == ProtocolHTTPS4 || p == ProtocolHTTPS6 +} + +// IsTCP 判断当前分组是否为TCP +func (this *ServerAddressGroup) IsTCP() bool { + p := this.Protocol() + return p == ProtocolTCP || p == ProtocolTCP4 || p == ProtocolTCP6 +} + +// IsTLS 判断当前分组是否为TLS +func (this *ServerAddressGroup) IsTLS() bool { + p := this.Protocol() + return p == ProtocolTLS || p == ProtocolTLS4 || p == ProtocolTLS6 +} + +// IsUnix 判断当前分组是否为Unix +func (this *ServerAddressGroup) IsUnix() bool { + p := this.Protocol() + return p == ProtocolUnix +} + +// IsUDP 判断当前分组是否为UDP +func (this *ServerAddressGroup) IsUDP() bool { + p := this.Protocol() + return p == ProtocolUDP +} + +// FirstServer 获取第一个Server +func (this *ServerAddressGroup) FirstServer() *ServerConfig { + if len(this.Servers) > 0 { + return this.Servers[0] + } + return nil +} diff --git a/pkg/serverconfigs/server_group_test.go b/pkg/serverconfigs/server_address_group_test.go similarity index 64% rename from pkg/serverconfigs/server_group_test.go rename to pkg/serverconfigs/server_address_group_test.go index 2340750..5e23322 100644 --- a/pkg/serverconfigs/server_group_test.go +++ b/pkg/serverconfigs/server_address_group_test.go @@ -5,29 +5,29 @@ import ( "testing" ) -func TestServerGroup_Protocol(t *testing.T) { +func TestServerAddressGroup_Protocol(t *testing.T) { a := assert.NewAssertion(t) { - group := NewServerGroup("tcp://127.0.0.1:1234") + group := NewServerAddressGroup("tcp://127.0.0.1:1234") a.IsTrue(group.Protocol() == ProtocolTCP) a.IsTrue(group.Addr() == "127.0.0.1:1234") } { - group := NewServerGroup("http4://127.0.0.1:1234") + group := NewServerAddressGroup("http4://127.0.0.1:1234") a.IsTrue(group.Protocol() == ProtocolHTTP4) a.IsTrue(group.Addr() == "127.0.0.1:1234") } { - group := NewServerGroup("127.0.0.1:1234") + group := NewServerAddressGroup("127.0.0.1:1234") a.IsTrue(group.Protocol() == ProtocolHTTP) a.IsTrue(group.Addr() == "127.0.0.1:1234") } { - group := NewServerGroup("unix:/tmp/my.sock") + group := NewServerAddressGroup("unix:/tmp/my.sock") a.IsTrue(group.Protocol() == ProtocolUnix) a.IsTrue(group.Addr() == "/tmp/my.sock") } diff --git a/pkg/serverconfigs/server_config.go b/pkg/serverconfigs/server_config.go index e6ef604..a756c25 100644 --- a/pkg/serverconfigs/server_config.go +++ b/pkg/serverconfigs/server_config.go @@ -41,6 +41,9 @@ type ServerConfig struct { HTTPCachePolicyId int64 `yaml:"httpCachePolicyId" json:"httpCachePolicyId"` HTTPCachePolicy *HTTPCachePolicy `yaml:"httpCachePolicy" json:"httpCachePolicy"` // 通过 HTTPCachePolicyId 获取 + // 分组 + Group *ServerGroupConfig `yaml:"group" json:"group"` + isOk bool } @@ -56,6 +59,23 @@ func NewServerConfig() *ServerConfig { } func (this *ServerConfig) Init() error { + // 分解Group + if this.Group != nil && this.Group.IsOn { + // reverse proxy + if this.IsHTTPFamily() && this.Group.HTTPReverseProxyRef != nil && this.Group.HTTPReverseProxyRef.IsPrior { + this.ReverseProxyRef = this.Group.HTTPReverseProxyRef + this.ReverseProxy = this.Group.HTTPReverseProxy + } + if this.IsTCPFamily() && this.Group.TCPReverseProxyRef != nil && this.Group.TCPReverseProxyRef.IsPrior { + this.ReverseProxyRef = this.Group.TCPReverseProxyRef + this.ReverseProxy = this.Group.TCPReverseProxy + } + if this.IsUDPFamily() && this.Group.UDPReverseProxyRef != nil && this.Group.UDPReverseProxyRef.IsPrior { + this.ReverseProxyRef = this.Group.UDPReverseProxyRef + this.ReverseProxy = this.Group.UDPReverseProxy + } + } + if this.HTTP != nil { err := this.HTTP.Init() if err != nil { diff --git a/pkg/serverconfigs/server_group.go b/pkg/serverconfigs/server_group.go deleted file mode 100644 index c9718a2..0000000 --- a/pkg/serverconfigs/server_group.go +++ /dev/null @@ -1,85 +0,0 @@ -package serverconfigs - -import "strings" - -type ServerGroup struct { - fullAddr string - Servers []*ServerConfig -} - -func NewServerGroup(fullAddr string) *ServerGroup { - return &ServerGroup{fullAddr: fullAddr} -} - -// 添加服务 -func (this *ServerGroup) Add(server *ServerConfig) { - this.Servers = append(this.Servers, server) -} - -// 获取完整的地址 -func (this *ServerGroup) FullAddr() string { - return this.fullAddr -} - -// 获取当前分组的协议 -func (this *ServerGroup) Protocol() Protocol { - for _, p := range AllProtocols() { - if strings.HasPrefix(this.fullAddr, p.String()+":") { - return p - } - } - return ProtocolHTTP -} - -// 获取当前分组的地址 -func (this *ServerGroup) Addr() string { - protocol := this.Protocol() - if protocol == ProtocolUnix { - return strings.TrimPrefix(this.fullAddr, protocol.String()+":") - } - return strings.TrimPrefix(this.fullAddr, protocol.String()+"://") -} - -// 判断当前分组是否为HTTP -func (this *ServerGroup) IsHTTP() bool { - p := this.Protocol() - return p == ProtocolHTTP || p == ProtocolHTTP4 || p == ProtocolHTTP6 -} - -// 判断当前分组是否为HTTPS -func (this *ServerGroup) IsHTTPS() bool { - p := this.Protocol() - return p == ProtocolHTTPS || p == ProtocolHTTPS4 || p == ProtocolHTTPS6 -} - -// 判断当前分组是否为TCP -func (this *ServerGroup) IsTCP() bool { - p := this.Protocol() - return p == ProtocolTCP || p == ProtocolTCP4 || p == ProtocolTCP6 -} - -// 判断当前分组是否为TLS -func (this *ServerGroup) IsTLS() bool { - p := this.Protocol() - return p == ProtocolTLS || p == ProtocolTLS4 || p == ProtocolTLS6 -} - -// 判断当前分组是否为Unix -func (this *ServerGroup) IsUnix() bool { - p := this.Protocol() - return p == ProtocolUnix -} - -// 判断当前分组是否为UDP -func (this *ServerGroup) IsUDP() bool { - p := this.Protocol() - return p == ProtocolUDP -} - -// 获取第一个Server -func (this *ServerGroup) FirstServer() *ServerConfig { - if len(this.Servers) > 0 { - return this.Servers[0] - } - return nil -} diff --git a/pkg/serverconfigs/server_group_config.go b/pkg/serverconfigs/server_group_config.go new file mode 100644 index 0000000..ad7887a --- /dev/null +++ b/pkg/serverconfigs/server_group_config.go @@ -0,0 +1,18 @@ +// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +package serverconfigs + +// ServerGroupConfig 服务分组配置 +type ServerGroupConfig struct { + Id int64 `yaml:"id" json:"id"` + Name string `yaml:"name" json:"name"` + IsOn bool `yaml:"isOn" json:"isOn"` + + // 反向代理配置 + HTTPReverseProxyRef *ReverseProxyRef `yaml:"httpReverseProxyRef" json:"httpReverseProxyRef"` + HTTPReverseProxy *ReverseProxyConfig `yaml:"httpReverseProxy" json:"httpReverseProxy"` + TCPReverseProxyRef *ReverseProxyRef `yaml:"tcpReverseProxyRef" json:"tcpReverseProxyRef"` + TCPReverseProxy *ReverseProxyConfig `yaml:"tcpReverseProxy" json:"tcpReverseProxy"` + UDPReverseProxyRef *ReverseProxyRef `yaml:"udpReverseProxyRef" json:"udpReverseProxyRef"` + UDPReverseProxy *ReverseProxyConfig `yaml:"udpReverseProxy" json:"udpReverseProxy"` +}