mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 02:16:16 +08:00
script
This commit is contained in:
parent
040fd345e0
commit
e10b0743dc
@ -23,6 +23,7 @@ func start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer listener.Close()
|
defer listener.Close()
|
||||||
|
fmt.Println(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema)
|
||||||
zkClient, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, 10, "", "")
|
zkClient, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, 10, "", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -176,7 +176,7 @@ type config struct {
|
|||||||
ZkAddr []string `yaml:"zkAddr"`
|
ZkAddr []string `yaml:"zkAddr"`
|
||||||
UserName string `yaml:"userName"`
|
UserName string `yaml:"userName"`
|
||||||
Password string `yaml:"password"`
|
Password string `yaml:"password"`
|
||||||
}
|
} `yaml:"zookeeper"`
|
||||||
Log struct {
|
Log struct {
|
||||||
StorageLocation string `yaml:"storageLocation"`
|
StorageLocation string `yaml:"storageLocation"`
|
||||||
RotationTime int `yaml:"rotationTime"`
|
RotationTime int `yaml:"rotationTime"`
|
||||||
@ -511,12 +511,11 @@ func (c *config) initConfig(config interface{}, configName, configFolderPath str
|
|||||||
}()
|
}()
|
||||||
_, err := os.Stat(configPath)
|
_, err := os.Stat(configPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err.Error())
|
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
configPath = filepath.Join(Root, "config", configName)
|
configPath = filepath.Join(Root, "config", configName)
|
||||||
fmt.Println(configPath, "not exist, use", configPath)
|
fmt.Println("use", configPath)
|
||||||
} else {
|
} else {
|
||||||
Root = filepath.Dir(configPath)
|
Root = filepath.Dir(configPath)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user