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.

31 lines
603 B

7 years ago
  1. package core
  2. import (
  3. ctypes "github.com/tendermint/tendermint/rpc/core/types"
  4. )
  5. // Get node health. Returns empty result (200 OK) on success, no response - in
  6. // case of an error.
  7. //
  8. // ```shell
  9. // curl 'localhost:46657/health'
  10. // ```
  11. //
  12. // ```go
  13. // client := client.NewHTTP("tcp://0.0.0.0:46657", "/websocket")
  14. // result, err := client.Health()
  15. // ```
  16. //
  17. // > The above command returns JSON structured like this:
  18. //
  19. // ```json
  20. // {
  21. // "error": "",
  22. // "result": {},
  23. // "id": "",
  24. // "jsonrpc": "2.0"
  25. // }
  26. // ```
  27. func Health() (*ctypes.ResultHealth, error) {
  28. return &ctypes.ResultHealth{}, nil
  29. }