Read bucket name from config yaml

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/4973/head^2
cai.zhang 2020-09-28 10:23:43 +08:00 committed by yefu.chen
parent af4375dd3e
commit eb1d7d5cc4
4 changed files with 8 additions and 4 deletions

View File

@ -71,6 +71,7 @@ type Writer struct {
Parallelism int
TopicStart int
TopicEnd int
Bucket string
}
type ServerConfig struct {

View File

@ -57,6 +57,7 @@ writer:
parallelism: 100
topicstart: 0
topicend: 128
bucket: "zilliz-hz"
proxy:
timezone: UTC+8

View File

@ -6,12 +6,13 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
// "github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/czs007/suvlim/conf"
// "github.com/aws/aws-sdk-go/service/s3/s3manager"
. "github.com/czs007/suvlim/storage/pkg/types"
"io"
)
var bucketName = "zilliz-hz"
var bucketName = conf.Config.Writer.Bucket
type S3Store struct {
client *s3.S3

View File

@ -3,12 +3,13 @@ package minio_driver
import (
"bytes"
"context"
"github.com/czs007/suvlim/conf"
. "github.com/czs007/suvlim/storage/pkg/types"
"github.com/minio/minio-go/v7"
"io"
. "github.com/czs007/suvlim/storage/pkg/types"
)
var bucketName = "zilliz"
var bucketName = conf.Config.Writer.Bucket
type minioStore struct {
client *minio.Client