feat(blahd): impl socket activation integration

This also allows arbitrary listening fd include UNIX domain sockets, via
environment variables as sd_listen_fds(3).
This commit is contained in:
oxalica 2024-09-11 13:14:06 -04:00
parent 87c8acd5b2
commit 98b2df2fdf
8 changed files with 206 additions and 13 deletions

View file

@ -1,6 +1,6 @@
# The example configuration file, required options are documented as
# `(Required)`, other options are optional and the example value given here is
# the default value.
# the default value, or example values for commented lines.
[database]
# If enabled, a in-memory non-persistent database is used instead. Options
@ -16,11 +16,16 @@ path = "/var/lib/blahd/db.sqlite"
# Note that parent directory will never be created and must already exist.
create = true
# Listener socket configuration. (Required)
# There must be exact one option under this section being set.
[listen]
# (Required)
# The local address to listen on.
# Listen on an address.
address = "localhost:8080"
# Use systemd socket activation mechanism to get listener fd from envvars.
# See also sd_listen_fds(3) and systemd.socket(5).
#systemd = true
[server]
# (Required)
# The global absolute URL prefix where this service is hosted.