From aa2ff7a97117e823bc3d536df428ac1302bbc93c Mon Sep 17 00:00:00 2001 From: shengjh <1572099106@qq.com> Date: Fri, 25 Sep 2020 15:30:15 +0800 Subject: [PATCH] Add s3 sriver type in storage Signed-off-by: shengjh <1572099106@qq.com> --- storage/pkg/storage.go | 3 +++ storage/pkg/types/types.go | 1 + 2 files changed, 4 insertions(+) diff --git a/storage/pkg/storage.go b/storage/pkg/storage.go index 14c87ba87..624d94d51 100644 --- a/storage/pkg/storage.go +++ b/storage/pkg/storage.go @@ -5,6 +5,7 @@ import ( "errors" minIODriver "github.com/czs007/suvlim/storage/internal/minio" tikvDriver "github.com/czs007/suvlim/storage/internal/tikv" + S3Driver "github.com/czs007/suvlim/storage/internal/S3" "github.com/czs007/suvlim/storage/pkg/types" ) @@ -25,6 +26,8 @@ func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error) return nil, err } return store, nil + case types.S3DRIVER: + store , err = S3Driver.NewS3Driver(ctx) } return nil, errors.New("unsupported driver") } \ No newline at end of file diff --git a/storage/pkg/types/types.go b/storage/pkg/types/types.go index 991a5e201..f0875b4bf 100644 --- a/storage/pkg/types/types.go +++ b/storage/pkg/types/types.go @@ -14,6 +14,7 @@ type SegmentDL = []byte const ( MinIODriver DriverType = "MinIO" TIKVDriver DriverType = "TIKV" + S3DRIVER DriverType = "S3" ) /* -- GitLab