pull/2001/head
withchao 2 years ago
parent 6e049890aa
commit 88e23f3e4a

@ -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":

@ -67,6 +67,7 @@ type Config struct {
} }
func NewMinio(cache cache.MinioCache, conf Config) (s3.Interface, error) { func NewMinio(cache cache.MinioCache, conf Config) (s3.Interface, error) {
fmt.Printf("minio config: %+v", conf)
u, err := url.Parse(conf.Endpoint) u, err := url.Parse(conf.Endpoint)
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save