migrate delete collection to grpc API on volume server

This commit is contained in:
Chris Lu
2018-10-15 00:03:55 -07:00
parent db152ca540
commit 8301519fb0
6 changed files with 134 additions and 42 deletions

View 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
}