Complete code refactoring

- `LOGGING` environment variable `json` or `human`
- `NODEID` environment variable (integer)
- Much cleaner go code
- Listener for exit of program to do cleanup
- All code is in packages except main.go
- Custom logger package added
- Connectivity checks reworked
- Healthcheck server on localhost only, so not exposed to outside world
- Updated `go.mod` and `go.sum`
This commit is contained in:
Quentin McGaw
2019-04-26 02:04:39 +02:00
parent ce88c48459
commit ed1823d244
45 changed files with 1896 additions and 1221 deletions

View File

@@ -13,6 +13,8 @@ services:
- DELAY=300
- ROOTURL=
- LISTENINGPORT=8000
- LOGGING=human
- NODEID=0
- RECORD1=example.com,@,namecheap,provider,0e4512a9c45a4fe88313bcc2234bf547
- RECORD2=example.info,@,namecheap,duckduckgo,157fd2a9c45a4fe88313bcc2234bfd58
- RECORD3=example.io,www,namecheap,opendns,0e4512a9c45a4fe88313bcc2234bf547