mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Update storage interface
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
18cf816e56
commit
18d7745261
1
proxy/proxy_test/generate_entity_id.go
Normal file
1
proxy/proxy_test/generate_entity_id.go
Normal file
@ -0,0 +1 @@
|
||||
package proxy_test
|
||||
@ -3,24 +3,23 @@ package storage
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
minIODriver "storage/internal/minio"
|
||||
tikvDriver "storage/internal/tikv"
|
||||
"storage/pkg/types"
|
||||
minIODriver "github.com/czs007/suvlim/storage/internal/minio"
|
||||
tikvDriver "github.com/czs007/suvlim/storage/internal/tikv"
|
||||
"github.com/czs007/suvlim/storage/pkg/types"
|
||||
)
|
||||
|
||||
func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error) {
|
||||
var err error
|
||||
var store types.Store
|
||||
driverType := types.DriverType(driver)
|
||||
switch driverType{
|
||||
case types.MinIODriver:
|
||||
switch driver{
|
||||
case types.TIKVDriver:
|
||||
store, err = tikvDriver.NewTikvStore(ctx)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
return store, nil
|
||||
case types.TIKVDriver:
|
||||
store, err = minIODriver.NewMinIOStore(ctx)
|
||||
case types.MinIODriver:
|
||||
store, err = minIODriver.NewMinioDriver(ctx)
|
||||
if err != nil {
|
||||
//panic(err.Error())
|
||||
return nil, err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user