mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 23:02:16 +00:00
31 lines
562 B
Go
31 lines
562 B
Go
|
package core
|
||
|
|
||
|
import (
|
||
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||
|
)
|
||
|
|
||
|
// Get node health. Checks whether new blocks are created.
|
||
|
//
|
||
|
// ```shell
|
||
|
// curl 'localhost:46657/health'
|
||
|
// ```
|
||
|
//
|
||
|
// ```go
|
||
|
// client := client.NewHTTP("tcp://0.0.0.0:46657", "/websocket")
|
||
|
// result, err := client.Health()
|
||
|
// ```
|
||
|
//
|
||
|
// > The above command returns JSON structured like this:
|
||
|
//
|
||
|
// ```json
|
||
|
// {
|
||
|
// "error": "",
|
||
|
// "result": {},
|
||
|
// "id": "",
|
||
|
// "jsonrpc": "2.0"
|
||
|
// }
|
||
|
// ```
|
||
|
func Health() (*ctypes.ResultHealth, error) {
|
||
|
return &ctypes.ResultHealth{}, nil
|
||
|
}
|