refactoring

This commit is contained in:
Chris Lu
2020-03-26 22:46:49 -07:00
parent 0a05052b5c
commit a5ce359999
2 changed files with 15 additions and 32 deletions

View File

@@ -1,26 +0,0 @@
package operation
import (
"context"
"google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
)
func Statistics(server string, grpcDialOption grpc.DialOption, req *master_pb.StatisticsRequest) (resp *master_pb.StatisticsResponse, err error) {
err = WithMasterServerClient(server, grpcDialOption, func(masterClient master_pb.SeaweedClient) error {
grpcResponse, grpcErr := masterClient.Statistics(context.Background(), req)
if grpcErr != nil {
return grpcErr
}
resp = grpcResponse
return nil
})
return
}