Skip to content

A console program implemented in Go for checking the health status of websites given a CSV file input as argument.

Notifications You must be signed in to change notification settings

thanakritlee/gohealthcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go HealthCheck

A console program implemented in Go for checking the health status of websites given a CSV file input as argument.

Background

This application was done as part of a take home assignment for Line Man in May 2020.

Prerequisites

  • Go 1.14.3

Setup

cd ./cmd/healthcheckline/
go build

The above commands will build the binary from the Go code.

Configuration

Included in ./configs/ exist a file called appsettings.yaml. This file is use for specifying the configurations that are used in the program.

Currently there exist 3 configuration settings that you must specify:

  • token - this is the API token received from Line Login.
  • reportendpoint - the API endpoint for sending the health check result.
  • timeout - the request time out value in seconds.

Input file

CSV

For CSV input file the expected format is a a link to a website per row, with no other column. An example is shown below:

https://www.google.com/
https://www.google.com/

Run

cd ./cmd/healthcheckerline/
./gohealthcheck /path/to/file/input.csv

Assuming that your input file which contain a list of web sites you want to check is called input.csv. The above command will run the program binary with the input file.

About

A console program implemented in Go for checking the health status of websites given a CSV file input as argument.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages