b4a48fd928
* 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