Skip to content

harishdurga/go-pinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-pinger

A simple Go app to ping websites. This is a simple Go application to ping websites for fun 😀😉.

How it works

There is a CSV file ping_urls.csv from which the application will read the list of urls to ping. For each url we will create a goroutine. After that, we will wait to receive channel messages from the goroutines. Once we receive all the messages for the urls we will bulk insert the results into MongoDB a single document for each of the response of a url. We will be uploading the following data to MongoDB

  • URL
  • Error if any
  • Time Taken To Complete The Request
  • Http Status Code

How to run

  • Clone the repo
git clone https://github.com/harishdurga/go-pinger
  • Change directory
cd go-pinger
  • Install dependencies
go install
export PINGER_MONGO_CONNECT_URI=
  • Run
go run main.go

Releases

No releases published

Packages

No packages published

Languages