refactor: unified naming for module startup functions.

pull/2100/head
Gordon 2 years ago
parent 8da7c837bd
commit 7f97a87554

@ -15,7 +15,6 @@
package zookeeper
import (
"fmt"
"os"
"strings"
"time"
@ -23,7 +22,6 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/tools/discoveryregistry"
openkeeper "github.com/openimsdk/tools/discoveryregistry/zookeeper"
"github.com/openimsdk/tools/errs"
)
// NewZookeeperDiscoveryRegister creates a new instance of ZookeeperDR for Zookeeper service discovery and registration.
@ -43,13 +41,7 @@ func NewZookeeperDiscoveryRegister(zkConf *config.Zookeeper) (discoveryregistry.
// openkeeper.WithLogger(log.NewZkLogger()),
)
if err != nil {
uriFormat := "address:%s, username:%s, password:%s, schema:%s."
errInfo := fmt.Sprintf(uriFormat,
zkConf.ZkAddr,
zkConf.Username,
zkConf.Password,
zkConf.Schema)
return nil, errs.WrapMsg(err, errInfo)
return nil, err
}
return zk, nil
}

Loading…
Cancel
Save