fix: remove openim chat config file

Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong (cubxxw)
2023-12-15 11:32:22 +08:00
parent a1eebcaeba
commit 61630275c9
3 changed files with 6 additions and 122 deletions
@@ -16,6 +16,7 @@ package discoveryregister
import (
"errors"
"os"
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/kubernetes"
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/zookeeper"
@@ -25,6 +26,11 @@ import (
// NewDiscoveryRegister creates a new service discovery and registry client based on the provided environment type.
func NewDiscoveryRegister(envType string) (discoveryregistry.SvcDiscoveryRegistry, error) {
if os.Getenv("ENVS_DISCOVERY") != "" {
envType = os.Getenv("ENVS_DISCOVERY")
}
switch envType {
case "zookeeper":
return zookeeper.NewZookeeperDiscoveryRegister()