11 Commits

Author SHA1 Message Date
Iain Sproat 035505cb0e chore(deps): bump dependencies (#29) 2024-01-03 19:03:24 +00:00
Iain Sproat f2872d6dea Configurable logging levels (#16)
* Update screenshot to match current output
* Log level is configurable
* Alert name is provided in log line, where available.
* Capitalise Discord, check err in integration test, and other syntax issues
* Go formatting syntax fixes
* Log the common alert name or group alert name, in that precedence
2022-11-21 21:04:05 +00:00
Iain Sproat 0ee0afdf99 Update Helm Chart and README (#8) 2022-11-14 10:42:05 +00:00
Iain Sproat b4a48fd928 Refactor and productionise (#6)
* Adds development instructions to README
* Replaces deprecated io/ioutil with io package
* Catch all thrown errors and handle them.
  - not catching errors could result in unknown behaviour
* Fix gofmt formatting issues
* Refactor to allow http client to be provided
  - default client does not have timeout etc., we may instead wish to provide a custom http client.
* Refactor to something closer to the standard go layout
  - separates alert forwarder into separate package to allow for testing/reuse
* Split out types, and split Discord client into its own package
* Renaming of symbols for readability
  - no need to abbreviate words in modern IDEs
* remove go-vet hook as it is broken when go files are not in root directory
* unit tests for ~90% coverage
* Update picture in README
* Return error status codes to caller in event of error from Discord
* Remove panic, replace with error status code response and log message. Improve the status codes that are returned to provide more context on what has occurred.
* Graceful shutdown of server, including signal handling
* Integration tests
  - mocks Discord server
  - tests Happy case and a couple of unhappy cases
  - most edge conditions are otherwise tested in unit tests
* CheckWebHook should return errors instead of logging
  - additional checks in tests for nil objects
  - attempt to solve integration test pollution by using different port numbers to prevent potential collision
  - Temporarily comment out test causing interaction pollution with other tests
* structured logging
* feat(exponential backoff): Added to Discord client
* Serve prometheus metrics
  - Monitoring for the discord client
* adds correlation ID to logging
* refactors the mock http client to allow it to work with instrumentation for monitoring
* Helm chart service monitor
* Improved flag and env var parsing
* Application version passed in via build args
* Order of precedence of configuration configuration file<environment variable<command line
* Mounts secret to file instead of in environment variable
* Adds build tag to integration tests to prevent them being run as a unit test
2022-11-14 09:46:27 +00:00
Iain Sproat a15481f294 Updates README (#3)
* Updates README
  * Update helm instructions.
* Generates README for helm chart
* Adds a schema.json file for helm chart
2022-11-07 22:43:17 +00:00
Iain Sproat 2c0628507c ci(pre-commit): Adds pre-commit script to verify Dockerfile & Go 2022-11-07 17:31:34 +00:00
Ben Cartwright-Cox df21563f32 Explain better how this fits into the prometheus stack 2021-02-28 18:20:51 +00:00
Ben Cartwright-Cox 2e7369c932 Shuffle file names around for prevent CDN caching :/ 2020-07-19 19:57:44 +01:00
Ben Cox 3b4fad8a09 Add docker hub link
I generally run these bins as systemd services, but you want to go all galaxy brain yourselves, here is the convenient option
2020-05-17 12:21:16 +01:00
David Young 0b75833a50 Updated Dockerization 2018-09-18 12:47:17 +12:00
Ben Cartwright-Cox a33608f222 Finishing tweaks to make it decent 2018-03-28 18:08:17 +01:00