mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(monitoring): more status endpoints
This commit is contained in:
parent
ebfd1f5a9a
commit
23b746191f
27 changed files with 344 additions and 138 deletions
|
|
@ -162,20 +162,22 @@
|
|||
service ? system.exports.services.${serviceName},
|
||||
portName ? "default",
|
||||
port ? service.ports.${portName},
|
||||
host ? access.${getAddressFor} system.name network,
|
||||
defaultPort ? null,
|
||||
network ? "lan",
|
||||
scheme ? null,
|
||||
getAddressFor ? "getAddressFor",
|
||||
}: let
|
||||
scheme' =
|
||||
if scheme == null
|
||||
then port.protocol
|
||||
else scheme;
|
||||
if scheme == null then "${port.protocol}://"
|
||||
else if scheme == "" then ""
|
||||
else "${scheme}://";
|
||||
port' =
|
||||
if !port.enable
|
||||
then throw "${system.name}.exports.services.${service.name}.ports.${portName} isn't enabled"
|
||||
else if port.port == defaultPort then ""
|
||||
else ":${toString port.port}";
|
||||
host = access.${getAddressFor} system.name network;
|
||||
url = "${scheme'}://${mkAddress6 host}${port'}";
|
||||
url = "${scheme'}${mkAddress6 host}${port'}";
|
||||
in
|
||||
assert service.enable; url;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue