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.

36 lines
696 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:26657/health'
  10. // ```
  11. //
  12. // ```go
  13. // client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket")
  14. // err := client.Start()
  15. // if err != nil {
  16. // // handle error
  17. // }
  18. // defer client.Stop()
  19. // result, err := client.Health()
  20. // ```
  21. //
  22. // > The above command returns JSON structured like this:
  23. //
  24. // ```json
  25. // {
  26. // "error": "",
  27. // "result": {},
  28. // "id": "",
  29. // "jsonrpc": "2.0"
  30. // }
  31. // ```
  32. func Health() (*ctypes.ResultHealth, error) {
  33. return &ctypes.ResultHealth{}, nil
  34. }