aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/stats.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-11-23 00:24:51 -0800
committerChris Lu <chris.lu@gmail.com>2018-11-23 00:24:51 -0800
commit444dfded84696eb2d67876e228939ca3f9e7819f (patch)
tree6a026fca7ac363c7f76fab963603733208ed1f12 /weed/operation/stats.go
parent2e32b44061e10d599faf6180d3f5bcffb16a12bb (diff)
downloadseaweedfs-444dfded84696eb2d67876e228939ca3f9e7819f.tar.xz
seaweedfs-444dfded84696eb2d67876e228939ca3f9e7819f.zip
add fs.FSStatfser for SeaweedFS weed mount
Diffstat (limited to 'weed/operation/stats.go')
-rw-r--r--weed/operation/stats.go24
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
+}