提交 aa2ff7a9 编写于 作者: S shengjh 提交者: yefu.chen

Add s3 sriver type in storage

Signed-off-by: Nshengjh <1572099106@qq.com>
上级 649732c1
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"errors" "errors"
minIODriver "github.com/czs007/suvlim/storage/internal/minio" minIODriver "github.com/czs007/suvlim/storage/internal/minio"
tikvDriver "github.com/czs007/suvlim/storage/internal/tikv" tikvDriver "github.com/czs007/suvlim/storage/internal/tikv"
S3Driver "github.com/czs007/suvlim/storage/internal/S3"
"github.com/czs007/suvlim/storage/pkg/types" "github.com/czs007/suvlim/storage/pkg/types"
) )
...@@ -25,6 +26,8 @@ func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error) ...@@ -25,6 +26,8 @@ func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error)
return nil, err return nil, err
} }
return store, nil return store, nil
case types.S3DRIVER:
store , err = S3Driver.NewS3Driver(ctx)
} }
return nil, errors.New("unsupported driver") return nil, errors.New("unsupported driver")
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ type SegmentDL = []byte ...@@ -14,6 +14,7 @@ type SegmentDL = []byte
const ( const (
MinIODriver DriverType = "MinIO" MinIODriver DriverType = "MinIO"
TIKVDriver DriverType = "TIKV" TIKVDriver DriverType = "TIKV"
S3DRIVER DriverType = "S3"
) )
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册