Skip to content

Releases: balki/anyhttp

v0.4.0

19 Dec 21:44
Compare
Choose a tag to compare

Changes

1. Change address syntax to be a URL

This allows to set additional options easily. E.g. unix?path=/run/app.sock&mode=660 will create a unix socket at /run/app.sock and also set the permission mode to 660. This directly gives the flexibility to the end user without having to support multiple config options in the application. Inspired by postgres url.

2. Support idle_timeout for systemd socket

Shut down the server if no requests are received for a while. systemd socket activation will restart the server on new request automatically. E.g. sysd?name=app.socket&idle_timeout=30m

Full Changelog: v0.3.0...v0.4.0

v0.3.0

14 Sep 13:24
Compare
Choose a tag to compare

Changes

  1. Add new module anyhttp/idle to track idle servers.
    Idle servers can be shutdown to save resources if there is a way to restart them automatically (e.g. systemd socket activation, doc)
  2. Add Serve function to return the type of address (unix/systemdfd/tcp) and the http.Server instance.

v0.2.0

01 May 04:19
Compare
Choose a tag to compare

Changes

  1. Improve error messages
  2. Refactor environment parsing
    Unset LISTEN* environment variables by default and save for future calls