From 400ec204bcb87062ba8365d82c78915d8b82fa86 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 21 Feb 2022 11:38:03 +0100 Subject: [PATCH] README.md: rename parameter 3. version to api as it can be more generic then just different versions. --- README.md | 2 +- src/api/interface.go | 4 ++++ src/api/v1.go | 2 -- src/api/v2.go | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0ad34b9..48904cf 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ first to last below: | - | ---------- | ----------------------- | -------------------------------------------------------------- | | 1 | url | Yes (port default `80`) | http url to the api. `http(s)://(:)` | | 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 diff --git a/src/api/interface.go b/src/api/interface.go index 0a2030a..d5ec925 100644 --- a/src/api/interface.go +++ b/src/api/interface.go @@ -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) } diff --git a/src/api/v1.go b/src/api/v1.go index 2115be3..21ad04b 100644 --- a/src/api/v1.go +++ b/src/api/v1.go @@ -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) diff --git a/src/api/v2.go b/src/api/v2.go index 7a83e1b..b3727a9 100644 --- a/src/api/v2.go +++ b/src/api/v2.go @@ -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)