mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-12-06 11:03:52 +00:00
The standalone binary now reads its config file every -reload-interval (default 5s) and on SIGHUP. When the content changes, it builds a new gateway and sends new requests to it. Requests that already run finish on the old gateway, which closes when the last one leaves or after -reload-drain-timeout (default 10m). A config that does not decode or that New() rejects is logged, and the old gateway keeps serving. SIGHUP rebuilds even when the content is unchanged, so a rotated file: secret takes effect. One atomic word holds the request count and the retired flag. With two separate atomics, a reload between them could close a gateway that a new request is still serving.