Skip to content

Commit

Permalink
feat: add healtcheck control table checks
Browse files Browse the repository at this point in the history
ref #1

Signed-off-by: Marko Kungla <marko.kungla@gmail.com>
  • Loading branch information
mkungla committed Mar 17, 2022
1 parent 0c2e316 commit 67d72d8
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 44 deletions.
21 changes: 12 additions & 9 deletions cmd-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,10 @@ func attachAPIEpochCommmands(apicmd *cli.Command) {
func attachAPIGeneralCommmands(apicmd *cli.Command) {
apicmd.Subcommands = append(apicmd.Subcommands, []*cli.Command{
{
Name: "get",
Usage: "send GET request to the specified API endpoint",
Category: "UTILS",
Name: "get",
Usage: "send GET request to the specified API endpoint",
Category: "UTILS",
ArgsUsage: "[endpoint]",
Action: func(ctx *cli.Context) error {
uri := ctx.Args().Get(0)
if len(uri) == 0 {
Expand All @@ -608,9 +609,10 @@ func attachAPIGeneralCommmands(apicmd *cli.Command) {
},
},
{
Name: "post",
Usage: "send POST request to the specified API endpoint",
Category: "UTILS",
Name: "post",
Usage: "send POST request to the specified API endpoint",
Category: "UTILS",
ArgsUsage: "[endpoint] [payload]",
Action: func(ctx *cli.Context) error {
uri := ctx.Args().Get(0)
pl := ctx.Args().Get(1)
Expand All @@ -635,9 +637,10 @@ func attachAPIGeneralCommmands(apicmd *cli.Command) {
},
},
{
Name: "head",
Usage: "head issues a HEAD request to the specified API endpoint",
Category: "UTILS",
Name: "head",
Usage: "head issues a HEAD request to the specified API endpoint",
Category: "UTILS",
ArgsUsage: "[endpoint]",
Action: func(ctx *cli.Context) error {
uri := ctx.Args().Get(0)
if ctx.NArg() == 0 || len(uri) == 0 {
Expand Down
Loading

0 comments on commit 67d72d8

Please sign in to comment.