diff --git a/storage/pkg/storage.go b/storage/pkg/storage.go index 14c87ba870f0532803812f776ce4cceb7df30baf..624d94d517b1c996b01283b148f3dd1bb10495aa 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 991a5e201405d07c921c46bef32ec9212e9ad17f..f0875b4bfe554a5c44c54843a581a1c9a22755ce 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" ) /*