You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
550 B

  1. package operation
  2. import (
  3. "context"
  4. "google.golang.org/grpc"
  5. "github.com/chrislusf/seaweedfs/weed/pb/master_pb"
  6. )
  7. func Statistics(server string, grpcDialOption grpc.DialOption, req *master_pb.StatisticsRequest) (resp *master_pb.StatisticsResponse, err error) {
  8. err = WithMasterServerClient(server, grpcDialOption, func(masterClient master_pb.SeaweedClient) error {
  9. grpcResponse, grpcErr := masterClient.Statistics(context.Background(), req)
  10. if grpcErr != nil {
  11. return grpcErr
  12. }
  13. resp = grpcResponse
  14. return nil
  15. })
  16. return
  17. }