migrate delete collection to grpc API on volume server
This commit is contained in:
22
weed/server/volume_grpc_admin.go
Normal file
22
weed/server/volume_grpc_admin.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package weed_server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
)
|
||||
|
||||
func (vs *VolumeServer) DeleteCollection(ctx context.Context, req *volume_server_pb.DeleteCollectionRequest) (*volume_server_pb.DeleteCollectionResponse, error) {
|
||||
|
||||
resp := &volume_server_pb.DeleteCollectionResponse{}
|
||||
|
||||
err := vs.store.DeleteCollection(req.Collection)
|
||||
|
||||
if err != nil {
|
||||
glog.V(3).Infof("delete collection %s: %v", req.Collection, err)
|
||||
}
|
||||
|
||||
return resp, err
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user