github.com/evdatsion/aphelion-dpos-bft@v0.32.1/rpc/core/health.go (about) 1 package core 2 3 import ( 4 ctypes "github.com/evdatsion/aphelion-dpos-bft/rpc/core/types" 5 rpctypes "github.com/evdatsion/aphelion-dpos-bft/rpc/lib/types" 6 ) 7 8 // Get node health. Returns empty result (200 OK) on success, no response - in 9 // case of an error. 10 // 11 // ```shell 12 // curl 'localhost:26657/health' 13 // ``` 14 // 15 // ```go 16 // client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket") 17 // err := client.Start() 18 // if err != nil { 19 // // handle error 20 // } 21 // defer client.Stop() 22 // result, err := client.Health() 23 // ``` 24 // 25 // > The above command returns JSON structured like this: 26 // 27 // ```json 28 // { 29 // "error": "", 30 // "result": {}, 31 // "id": "", 32 // "jsonrpc": "2.0" 33 // } 34 // ``` 35 func Health(ctx *rpctypes.Context) (*ctypes.ResultHealth, error) { 36 return &ctypes.ResultHealth{}, nil 37 }