diff options
Diffstat (limited to 'weed/operation/stats.go')
| -rw-r--r-- | weed/operation/stats.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/weed/operation/stats.go b/weed/operation/stats.go new file mode 100644 index 000000000..277b0e835 --- /dev/null +++ b/weed/operation/stats.go @@ -0,0 +1,24 @@ +package operation + +import ( + "context" + + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" +) + +func Statistics(server string, req *master_pb.StatisticsRequest) (resp *master_pb.StatisticsResponse, err error) { + + err = withMasterServerClient(server, func(masterClient master_pb.SeaweedClient) error { + grpcResponse, grpcErr := masterClient.Statistics(context.Background(), req) + if grpcErr != nil { + return grpcErr + } + + resp = grpcResponse + + return nil + + }) + + return +} |
