Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release

This commit is contained in:
Gordon
2022-09-09 10:59:00 +08:00
14 changed files with 8698 additions and 41 deletions
+20 -6
View File
@@ -131,8 +131,6 @@ type config struct {
OpenImGroupPort []int `yaml:"openImGroupPort"`
OpenImAuthPort []int `yaml:"openImAuthPort"`
OpenImPushPort []int `yaml:"openImPushPort"`
OpenImStatisticsPort []int `yaml:"openImStatisticsPort"`
OpenImMessageCmsPort []int `yaml:"openImMessageCmsPort"`
OpenImAdminCmsPort []int `yaml:"openImAdminCmsPort"`
OpenImOfficePort []int `yaml:"openImOfficePort"`
OpenImOrganizationPort []int `yaml:"openImOrganizationPort"`
@@ -141,16 +139,14 @@ type config struct {
OpenImRealTimeCommPort []int `yaml:"openImRealTimeCommPort"`
}
RpcRegisterName struct {
OpenImStatisticsName string `yaml:"openImStatisticsName"`
OpenImUserName string `yaml:"openImUserName"`
OpenImFriendName string `yaml:"openImFriendName"`
OpenImUserName string `yaml:"openImUserName"`
OpenImFriendName string `yaml:"openImFriendName"`
// OpenImOfflineMessageName string `yaml:"openImOfflineMessageName"`
OpenImMsgName string `yaml:"openImMsgName"`
OpenImPushName string `yaml:"openImPushName"`
OpenImRelayName string `yaml:"openImRelayName"`
OpenImGroupName string `yaml:"openImGroupName"`
OpenImAuthName string `yaml:"openImAuthName"`
OpenImMessageCMSName string `yaml:"openImMessageCMSName"`
OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
OpenImOfficeName string `yaml:"openImOfficeName"`
OpenImOrganizationName string `yaml:"openImOrganizationName"`
@@ -513,6 +509,24 @@ type config struct {
Rtc struct {
SignalTimeout string `yaml:"signalTimeout"`
} `yaml:"rtc"`
Prometheus struct {
Enable bool `yaml:"enable"`
UserPrometheusPort []int `yaml:"userPrometheusPort"`
FriendPrometheusPort []int `yaml:"friendPrometheusPort"`
MessagePrometheusPort []int `yaml:"messagePrometheusPort"`
MessageGatewayPrometheusPort []int `yaml:"messageGatewayPrometheusPort"`
GroupPrometheusPort []int `yaml:"groupPrometheusPort"`
AuthPrometheusPort []int `yaml:"authPrometheusPort"`
PushPrometheusPort []int `yaml:"pushPrometheusPort"`
AdminCmsPrometheusPort []int `yaml:"adminCmsPrometheusPort"`
OfficePrometheusPort []int `yaml:"officePrometheusPort"`
OrganizationPrometheusPort []int `yaml:"organizationPrometheusPort"`
ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"`
CachePrometheusPort []int `yaml:"cachePrometheusPort"`
RealTimeCommPrometheusPort []int `yaml:"realTimeCommPrometheusPort"`
MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"`
} `yaml:"prometheus"`
}
type PConversation struct {
ReliabilityLevel int `yaml:"reliabilityLevel"`
+1 -1
View File
@@ -56,7 +56,7 @@ func initMysqlDB() {
Writer{},
logger.Config{
SlowThreshold: 200 * time.Millisecond, // Slow SQL threshold
LogLevel: logger.Info, // Log level
LogLevel: logger.Warn, // Log level
IgnoreRecordNotFoundError: true, // Ignore ErrRecordNotFound error for logger
Colorful: true, // Disable color
},
-8
View File
@@ -139,14 +139,6 @@ func GetConfigConn(serviceName string, operationID string) *grpc.ClientConn {
if config.Config.RpcRegisterName.OpenImAuthName == serviceName {
configPortList = config.Config.RpcPort.OpenImAuthPort
}
//8
if config.Config.RpcRegisterName.OpenImMessageCMSName == serviceName {
configPortList = config.Config.RpcPort.OpenImMessageCmsPort
}
//9
if config.Config.RpcRegisterName.OpenImAdminCMSName == serviceName {
configPortList = config.Config.RpcPort.OpenImAdminCmsPort
}
//10
if config.Config.RpcRegisterName.OpenImOfficeName == serviceName {
configPortList = config.Config.RpcPort.OpenImOfficePort