pull/454/head
withchao 2 years ago
parent 0b27d921d6
commit 5bcec17f5c

@ -55,7 +55,7 @@ func run(port int) error {
fmt.Println("api start init discov client")
var client discoveryregistry.SvcDiscoveryRegistry
client, err = openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema,
openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.UserName,
openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.Username,
config.Config.Zookeeper.Password), openKeeper.WithRoundRobin(), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger()))
if err != nil {
return err

@ -5,7 +5,7 @@
zookeeper:
schema: openim #默认即可
address: [ 127.0.0.1:2181 ] #
userName:
username:
password:
mysql:
@ -42,9 +42,9 @@ kafka:
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
latestMsgToRedis:
topic: "latestMsgToRedis" #
offlineMsgToMongoMysql:
offlineMsgToMongo:
topic: "offlineMsgToMongoMysql" #用于mongo和mysql保存消息
msqToPush:
msgToPush:
topic: "msqToPush" #消息push
msgToModify:
topic: "msgToModify" #消息push
@ -167,8 +167,8 @@ push:
manager:
#app管理员userID和nickename 用于管理后台登录
appManagerUserID: [ "openIM123456","openIM654321","openIMAdmin" ]
appManagerNickname: [ "system1","system2", "system3" ]
userID: [ "openIM123456","openIM654321","openIMAdmin" ]
nickname: [ "system1","system2", "system3" ]
@ -275,5 +275,6 @@ prometheus:
pushPrometheusPort: [ 20170 ]
conversationPrometheusPort: [ 20230 ]
rtcPrometheusPort: [ 21300 ]
thirdPrometheusPort: [ 21301 ]
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # 端口数量和 script/path_info.cfg msg_transfer_service_num保持一致

@ -48,7 +48,7 @@ func StartTransfer(prometheusPort int) error {
return err
}
client, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema,
openKeeper.WithFreq(time.Hour), openKeeper.WithRoundRobin(), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.UserName,
openKeeper.WithFreq(time.Hour), openKeeper.WithRoundRobin(), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.Username,
config.Config.Zookeeper.Password), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger()))
if err != nil {
return err

@ -36,7 +36,7 @@ type config struct {
Zookeeper struct {
Schema string `yaml:"schema"`
ZkAddr []string `yaml:"address"`
UserName string `yaml:"userName"`
Username string `yaml:"username"`
Password string `yaml:"password"`
} `yaml:"zookeeper"`
@ -68,7 +68,7 @@ type config struct {
Redis struct {
Address []string `yaml:"address"`
Username string `yaml:"username"`
Password string `yaml:"passWord"`
Password string `yaml:"password"`
} `yaml:"redis"`
Kafka struct {
@ -80,7 +80,7 @@ type config struct {
} `yaml:"latestMsgToRedis"`
MsgToMongo struct {
Topic string `yaml:"topic"`
} `yaml:"offlineMsgToMongoMysql"`
} `yaml:"offlineMsgToMongo"`
MsgToPush struct {
Topic string `yaml:"topic"`
} `yaml:"msgToPush"`
@ -102,7 +102,8 @@ type config struct {
} `yaml:"rpc"`
Api struct {
ListenIP string `yaml:"listenIP"`
OpenImApiPort []int `yaml:"openImApiPort"`
ListenIP string `yaml:"listenIP"`
} `yaml:"api"`
Object struct {
@ -156,7 +157,6 @@ type config struct {
OpenImAuthPort []int `yaml:"openImAuthPort"`
OpenImPushPort []int `yaml:"openImPushPort"`
OpenImConversationPort []int `yaml:"openImConversationPort"`
OpenImCachePort []int `yaml:"openImCachePort"`
OpenImRtcPort []int `yaml:"openImRtcPort"`
OpenImThirdPort []int `yaml:"openImThirdPort"`
} `yaml:"rpcPort"`
@ -212,8 +212,8 @@ type config struct {
} `yaml:"jpns"`
}
Manager struct {
AppManagerUserID []string `yaml:"appManagerUserID"`
Nickname []string `yaml:"nickname"`
UserID []string `yaml:"userID"`
Nickname []string `yaml:"nickname"`
} `yaml:"manager"`
MultiLoginPolicy int `yaml:"multiLoginPolicy"`

@ -27,7 +27,7 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
}
defer listener.Close()
zkClient, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema,
openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.UserName,
openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.Username,
config.Config.Zookeeper.Password), openKeeper.WithRoundRobin(), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger()))
if err != nil {
return utils.Wrap1(err)

Loading…
Cancel
Save