1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-27 10:53:44 +02:00

README.md: rename parameter 3. version to api as it can be more generic then just different versions.

This commit is contained in:
Henrik Hautakoski 2022-02-21 11:38:03 +01:00
parent ddc7406a4c
commit 400ec204bc
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
4 changed files with 5 additions and 5 deletions

View file

@ -43,7 +43,7 @@ first to last below:
| - | ---------- | ----------------------- | -------------------------------------------------------------- |
| 1 | url | Yes (port default `80`) | http url to the api. `http(s)://<ip-or-domain>(:<port>)` |
| 2 | num_blocks | No (default `10`) | Number of blocks the api can drift before reported `down` |
| 3 | version | No (default `v1`) | API Version to check against, `v1` = standard, `v2` = Hyperion |
| 3 | api | No (default `v1`) | Type of API to check against, `v1` = standard, `v2` = Hyperion |
| 4 | host | No (default from `url`) | Value to send in the `HTTP Host Header` to the API |
### Response

View file

@ -6,6 +6,10 @@ import (
)
type ApiInterface interface {
// Name of the api
Name() string
// Call api and validate it's status.
Call() (haproxy.HealthCheckStatus, string)
}

View file

@ -24,8 +24,6 @@ func (e EosioV1) Name() string {
return "v1"
}
// check_api - Validates head block time.
// ---------------------------------------------------------
func (e EosioV1) Call() (haproxy.HealthCheckStatus, string) {
info, err := eosapi.GetInfo(e.params)

View file

@ -24,8 +24,6 @@ func (e EosioV2) Name() string {
return "v2"
}
// check_api - Validates head block time.
// ---------------------------------------------------------
func (e EosioV2) Call() (haproxy.HealthCheckStatus, string) {
health, err := eosapi.GetHealth(e.params)