1
This commit is contained in:
parent
0e20ec7538
commit
418f5351e5
@ -7,6 +7,7 @@ import (
|
||||
|
||||
const (
|
||||
MT_SERVER_INFO = iota
|
||||
MT_RANK_CONFIG
|
||||
MT_MAX
|
||||
)
|
||||
|
||||
@ -18,15 +19,21 @@ func (this *MetaMgr) Init() *MetaMgr {
|
||||
this.MetaMgr.Init()
|
||||
configDir := "../config/"
|
||||
if !f5.IsOnlineEnv() {
|
||||
configDir = "/var/data/conf_test/analyseapi/"
|
||||
configDir = "/var/data/conf_test/rankserver/"
|
||||
}
|
||||
metaClasses := &[]f5.MetaClass{
|
||||
f5.MetaClass{
|
||||
PrimKey: "InstanceId",
|
||||
FileName: configDir + "analyseapi.cluster.json",
|
||||
FileName: configDir + "rankserver.cluster.json",
|
||||
Idx: MT_SERVER_INFO,
|
||||
RawMeta: (*mt.ServerInfoMetas)(nil),
|
||||
WrapMeta: (*MtwServerInfo)(nil)},
|
||||
f5.MetaClass{
|
||||
PrimKey: "Name",
|
||||
FileName: configDir + "rank_config.json",
|
||||
Idx: MT_RANK_CONFIG,
|
||||
RawMeta: (*mt.RankConfig)(nil),
|
||||
WrapMeta: (*MtwRankConfig)(nil)},
|
||||
}
|
||||
this.MetaMgr.RegisterMetaClasses(metaClasses)
|
||||
this.Load()
|
||||
@ -45,3 +52,7 @@ func (this *MetaMgr) GetServer(instance_id int32) *MtwServerInfo {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (this *MetaMgr) GetRankConfig() []*MtwRankConfig {
|
||||
return this.MetaMgr.GetMetaList(MT_RANK_CONFIG).([]*MtwRankConfig)
|
||||
}
|
||||
|
@ -5,3 +5,11 @@ import "mt"
|
||||
type MtwServerInfo struct {
|
||||
*mt.ServerInfo
|
||||
}
|
||||
|
||||
type MtwRankConfig struct {
|
||||
*mt.RankConfig
|
||||
}
|
||||
|
||||
func (this* MtwRankConfig) Init() {
|
||||
|
||||
}
|
||||
|
@ -135,6 +135,148 @@ func (x *ServerInfoMetas) GetValues() []*ServerInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Host *string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
|
||||
Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
|
||||
Passwd *string `protobuf:"bytes,3,opt,name=passwd" json:"passwd,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RedisConfig) Reset() {
|
||||
*x = RedisConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RedisConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RedisConfig) ProtoMessage() {}
|
||||
|
||||
func (x *RedisConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[2]
|
||||
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 RedisConfig.ProtoReflect.Descriptor instead.
|
||||
func (*RedisConfig) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetHost() string {
|
||||
if x != nil && x.Host != nil {
|
||||
return *x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetPort() int32 {
|
||||
if x != nil && x.Port != nil {
|
||||
return *x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetPasswd() string {
|
||||
if x != nil && x.Passwd != nil {
|
||||
return *x.Passwd
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MysqlConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InstanceId *int32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId" json:"instance_id,omitempty"`
|
||||
Host *string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
|
||||
Port *int32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
|
||||
User *string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
|
||||
Passwd *string `protobuf:"bytes,5,opt,name=passwd" json:"passwd,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) Reset() {
|
||||
*x = MysqlConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MysqlConfig) ProtoMessage() {}
|
||||
|
||||
func (x *MysqlConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[3]
|
||||
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 MysqlConfig.ProtoReflect.Descriptor instead.
|
||||
func (*MysqlConfig) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetInstanceId() int32 {
|
||||
if x != nil && x.InstanceId != nil {
|
||||
return *x.InstanceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetHost() string {
|
||||
if x != nil && x.Host != nil {
|
||||
return *x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetPort() int32 {
|
||||
if x != nil && x.Port != nil {
|
||||
return *x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetUser() string {
|
||||
if x != nil && x.User != nil {
|
||||
return *x.User
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetPasswd() string {
|
||||
if x != nil && x.Passwd != nil {
|
||||
return *x.Passwd
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RankConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -151,7 +293,7 @@ type RankConfig struct {
|
||||
func (x *RankConfig) Reset() {
|
||||
*x = RankConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[2]
|
||||
mi := &file_mt_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -164,7 +306,7 @@ func (x *RankConfig) String() string {
|
||||
func (*RankConfig) ProtoMessage() {}
|
||||
|
||||
func (x *RankConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[2]
|
||||
mi := &file_mt_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -177,7 +319,7 @@ func (x *RankConfig) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RankConfig.ProtoReflect.Descriptor instead.
|
||||
func (*RankConfig) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{2}
|
||||
return file_mt_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *RankConfig) GetOnlyChannels() []string {
|
||||
@ -233,7 +375,7 @@ type RankConfigMetas struct {
|
||||
func (x *RankConfigMetas) Reset() {
|
||||
*x = RankConfigMetas{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[3]
|
||||
mi := &file_mt_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -246,7 +388,7 @@ func (x *RankConfigMetas) String() string {
|
||||
func (*RankConfigMetas) ProtoMessage() {}
|
||||
|
||||
func (x *RankConfigMetas) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[3]
|
||||
mi := &file_mt_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -259,246 +401,10 @@ func (x *RankConfigMetas) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RankConfigMetas.ProtoReflect.Descriptor instead.
|
||||
func (*RankConfigMetas) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *RankConfigMetas) GetValues() []*RankConfig {
|
||||
if x != nil {
|
||||
return x.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Host *string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
|
||||
Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
|
||||
Passwd *string `protobuf:"bytes,3,opt,name=passwd" json:"passwd,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RedisConfig) Reset() {
|
||||
*x = RedisConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RedisConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RedisConfig) ProtoMessage() {}
|
||||
|
||||
func (x *RedisConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_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 RedisConfig.ProtoReflect.Descriptor instead.
|
||||
func (*RedisConfig) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetHost() string {
|
||||
if x != nil && x.Host != nil {
|
||||
return *x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetPort() int32 {
|
||||
if x != nil && x.Port != nil {
|
||||
return *x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RedisConfig) GetPasswd() string {
|
||||
if x != nil && x.Passwd != nil {
|
||||
return *x.Passwd
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RedisConfigMetas struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Values []*RedisConfig `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RedisConfigMetas) Reset() {
|
||||
*x = RedisConfigMetas{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RedisConfigMetas) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RedisConfigMetas) ProtoMessage() {}
|
||||
|
||||
func (x *RedisConfigMetas) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[5]
|
||||
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 RedisConfigMetas.ProtoReflect.Descriptor instead.
|
||||
func (*RedisConfigMetas) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *RedisConfigMetas) GetValues() []*RedisConfig {
|
||||
if x != nil {
|
||||
return x.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MysqlConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InstanceId *int32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId" json:"instance_id,omitempty"`
|
||||
Host *string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
|
||||
Port *int32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
|
||||
User *string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"`
|
||||
Passwd *string `protobuf:"bytes,5,opt,name=passwd" json:"passwd,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) Reset() {
|
||||
*x = MysqlConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MysqlConfig) ProtoMessage() {}
|
||||
|
||||
func (x *MysqlConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[6]
|
||||
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 MysqlConfig.ProtoReflect.Descriptor instead.
|
||||
func (*MysqlConfig) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetInstanceId() int32 {
|
||||
if x != nil && x.InstanceId != nil {
|
||||
return *x.InstanceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetHost() string {
|
||||
if x != nil && x.Host != nil {
|
||||
return *x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetPort() int32 {
|
||||
if x != nil && x.Port != nil {
|
||||
return *x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetUser() string {
|
||||
if x != nil && x.User != nil {
|
||||
return *x.User
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MysqlConfig) GetPasswd() string {
|
||||
if x != nil && x.Passwd != nil {
|
||||
return *x.Passwd
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MysqlConfigMetas struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Values []*MysqlConfig `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MysqlConfigMetas) Reset() {
|
||||
*x = MysqlConfigMetas{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mt_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MysqlConfigMetas) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MysqlConfigMetas) ProtoMessage() {}
|
||||
|
||||
func (x *MysqlConfigMetas) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mt_proto_msgTypes[7]
|
||||
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 MysqlConfigMetas.ProtoReflect.Descriptor instead.
|
||||
func (*MysqlConfigMetas) Descriptor() ([]byte, []int) {
|
||||
return file_mt_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MysqlConfigMetas) GetValues() []*MysqlConfig {
|
||||
func (x *RankConfigMetas) GetValues() []*RankConfig {
|
||||
if x != nil {
|
||||
return x.Values
|
||||
}
|
||||
@ -516,36 +422,29 @@ var file_mt_proto_rawDesc = []byte{
|
||||
0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x22, 0x31, 0x0a, 0x0f, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x1e, 0x0a, 0x06,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d,
|
||||
0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x84, 0x01, 0x0a,
|
||||
0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, 0x0a, 0x0d, 0x6f,
|
||||
0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x09, 0x12, 0x18, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a,
|
||||
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x12, 0x15,
|
||||
0x0a, 0x0d, 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x22, 0x31, 0x0a, 0x0f, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x1e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6d, 0x74, 0x2e, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0c, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x12, 0x0e, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x22, 0x33, 0x0a, 0x10, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x74, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5c, 0x0a, 0x0b, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x13, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0c, 0x0a, 0x04, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x12, 0x0e, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x22, 0x33, 0x0a, 0x10, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x74, 0x2e, 0x4d, 0x79,
|
||||
0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x6d,
|
||||
0x74,
|
||||
0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x0b,
|
||||
0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0c, 0x0a, 0x04, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0e, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77,
|
||||
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x22, 0x5c, 0x0a, 0x0b, 0x4d, 0x79, 0x73, 0x71, 0x6c,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x13, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0c, 0x0a, 0x04, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e, 0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x22, 0x84, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, 0x0a, 0x0d, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x12, 0x18, 0x0a, 0x10, 0x65,
|
||||
0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f,
|
||||
0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x12, 0x15, 0x0a, 0x0d, 0x64, 0x62, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0c,
|
||||
0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x22, 0x31, 0x0a, 0x0f,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12,
|
||||
0x1e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0e, 0x2e, 0x6d, 0x74, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x6d, 0x74,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -560,27 +459,23 @@ func file_mt_proto_rawDescGZIP() []byte {
|
||||
return file_mt_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mt_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_mt_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_mt_proto_goTypes = []interface{}{
|
||||
(*ServerInfo)(nil), // 0: mt.ServerInfo
|
||||
(*ServerInfoMetas)(nil), // 1: mt.ServerInfoMetas
|
||||
(*RankConfig)(nil), // 2: mt.RankConfig
|
||||
(*RankConfigMetas)(nil), // 3: mt.RankConfigMetas
|
||||
(*RedisConfig)(nil), // 4: mt.RedisConfig
|
||||
(*RedisConfigMetas)(nil), // 5: mt.RedisConfigMetas
|
||||
(*MysqlConfig)(nil), // 6: mt.MysqlConfig
|
||||
(*MysqlConfigMetas)(nil), // 7: mt.MysqlConfigMetas
|
||||
(*RedisConfig)(nil), // 2: mt.RedisConfig
|
||||
(*MysqlConfig)(nil), // 3: mt.MysqlConfig
|
||||
(*RankConfig)(nil), // 4: mt.RankConfig
|
||||
(*RankConfigMetas)(nil), // 5: mt.RankConfigMetas
|
||||
}
|
||||
var file_mt_proto_depIdxs = []int32{
|
||||
0, // 0: mt.ServerInfoMetas.values:type_name -> mt.ServerInfo
|
||||
2, // 1: mt.RankConfigMetas.values:type_name -> mt.RankConfig
|
||||
4, // 2: mt.RedisConfigMetas.values:type_name -> mt.RedisConfig
|
||||
6, // 3: mt.MysqlConfigMetas.values:type_name -> mt.MysqlConfig
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
4, // 1: mt.RankConfigMetas.values:type_name -> mt.RankConfig
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] 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
|
||||
}
|
||||
|
||||
func init() { file_mt_proto_init() }
|
||||
@ -614,30 +509,6 @@ func file_mt_proto_init() {
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankConfigMetas); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RedisConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -649,19 +520,7 @@ func file_mt_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RedisConfigMetas); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_mt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MysqlConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -673,8 +532,20 @@ func file_mt_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MysqlConfigMetas); i {
|
||||
file_mt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mt_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RankConfigMetas); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -692,7 +563,7 @@ func file_mt_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_mt_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -14,6 +14,22 @@ message ServerInfoMetas
|
||||
repeated ServerInfo values = 1;
|
||||
}
|
||||
|
||||
message RedisConfig
|
||||
{
|
||||
optional string host = 1;
|
||||
optional int32 port = 2;
|
||||
optional string passwd = 3;
|
||||
}
|
||||
|
||||
message MysqlConfig
|
||||
{
|
||||
optional int32 instance_id = 1;
|
||||
optional string host = 2;
|
||||
optional int32 port = 3;
|
||||
optional string user = 4;
|
||||
optional string passwd = 5;
|
||||
}
|
||||
|
||||
message RankConfig
|
||||
{
|
||||
repeated string only_channels = 1;
|
||||
@ -28,29 +44,3 @@ message RankConfigMetas
|
||||
{
|
||||
repeated RankConfig values = 1;
|
||||
}
|
||||
|
||||
message RedisConfig
|
||||
{
|
||||
optional string host = 1;
|
||||
optional int32 port = 2;
|
||||
optional string passwd = 3;
|
||||
}
|
||||
|
||||
message RedisConfigMetas
|
||||
{
|
||||
repeated RedisConfig values = 1;
|
||||
}
|
||||
|
||||
message MysqlConfig
|
||||
{
|
||||
optional int32 instance_id = 1;
|
||||
optional string host = 2;
|
||||
optional int32 port = 3;
|
||||
optional string user = 4;
|
||||
optional string passwd = 5;
|
||||
}
|
||||
|
||||
message MysqlConfigMetas
|
||||
{
|
||||
repeated MysqlConfig values = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user