|
|
@ -17,7 +17,6 @@ package third
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"github.com/OpenIMSDK/tools/log"
|
|
|
|
|
|
|
|
"net/url"
|
|
|
|
"net/url"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
@ -41,8 +40,6 @@ import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func Start(config *config.GlobalConfig, client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
|
|
|
func Start(config *config.GlobalConfig, client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
|
|
|
log.ZDebug(context.Background(), "config19999999999999999999999999999999999", config, "javadfdas")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mongo, err := unrelation.NewMongo(config)
|
|
|
|
mongo, err := unrelation.NewMongo(config)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
@ -73,7 +70,7 @@ func Start(config *config.GlobalConfig, client discoveryregistry.SvcDiscoveryReg
|
|
|
|
// 根据配置文件策略选择 oss 方式
|
|
|
|
// 根据配置文件策略选择 oss 方式
|
|
|
|
enable := config.Object.Enable
|
|
|
|
enable := config.Object.Enable
|
|
|
|
var o s3.Interface
|
|
|
|
var o s3.Interface
|
|
|
|
switch config.Object.Enable {
|
|
|
|
switch enable {
|
|
|
|
case "minio":
|
|
|
|
case "minio":
|
|
|
|
o, err = minio.NewMinio(cache.NewMinioCache(rdb), minio.Config(config.Object.Minio))
|
|
|
|
o, err = minio.NewMinio(cache.NewMinioCache(rdb), minio.Config(config.Object.Minio))
|
|
|
|
case "cos":
|
|
|
|
case "cos":
|
|
|
|