From c19dc9a63b5af75b9de44d0b97e13fb527112503 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 9 Dec 2022 13:08:00 +0100 Subject: [PATCH] README.md: Adding cool badges. --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f4deeaa..957425a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Antelope API Healthcheck for HAProxy +[![Test](https://github.com/eosswedenorg/antelope-api-healthcheck/actions/workflows/test.yml/badge.svg)](https://github.com/eosswedenorg/antelope-api-healthcheck/actions/workflows/test.yml) +[![Report](https://goreportcard.com/badge/github.com/eosswedenorg/antelope-api-healthcheck)](https://goreportcard.com/report/github.com/eosswedenorg/antelope-api-healthcheck) + This program implements Antelope healthcheck for HAProxy over TCP. ## Compiling @@ -27,32 +30,31 @@ The protocol is simple and has 4 rules. 3. Each parameter inside a `Request` is separated by `|` 4. Each response contains exactly one `status code` (see below) - ### Request The following parameters are supported in a request and are ordered from first to last below: -| # | Name | Required | Description | -| - | ---------- | ----------------------- | ----------------------------------------------------------------------------------------------- | -| 1 | api | Yes | Type of API to check against, `v1` = standard, `v2` = Hyperion, `atomic` = atomicassets | -| 2 | url | Yes (port default `80`) | http url to the api. `http(s)://(:)` | -| 3 | num_blocks | No (default `10`) | Number of blocks the api can drift before reported `down` | -| 4 | host | No (default from `url`) | Value to send in the `HTTP Host Header` to the API | +| # | Name | Required | Description | +| - | ---------- | ------------------------- | -------------------------------------------------------------------------------------------- | +| 1 | api | Yes | Type of API to check against,`v1` = standard, `v2` = Hyperion, `atomic` = atomicassets | +| 2 | url | Yes (port default `80`) | http url to the api.`http(s)://(:)` | +| 3 | num_blocks | No (default `10`) | Number of blocks the api can drift before reported `down` | +| 4 | host | No (default from `url`) | Value to send in the `HTTP Host Header` to the API | ### Response The api can respond with exactly one `status code`. See [HAproxy documentation](https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-agent-check) for more information -| code | Description | -| --------- | ---------------------------------------------------------- | -| `up` | Api is healthy | -| `down` | Api is not healthy | -| `fail` | The program failed to read the status from the api. | -| `maint` | Api is set in maintenance mode (not used) | +| code | Description | +| ----------- | ------------------------------------------------------------ | +| `up` | Api is healthy | +| `down` | Api is not healthy | +| `fail` | The program failed to read the status from the api. | +| `maint` | Api is set in maintenance mode (not used) | | `ready` | Api is ready again after being in `maint` state (not used) | -| `stopped` | Api has been stopped manually (not used) | +| `stopped` | Api has been stopped manually (not used) | ## Author