Xirsys.XTurn.Certs.Watcher (xturn v2.0.0)

Copy Markdown View Source

Polls configured certificate files and reloads secure listeners on change.

What problem this solves

Automated renewals (lego hooks, certbot, manual copy) update PEM files on disk without restarting the BEAM. Polling detects content changes and calls Certs.reload/0. A two-poll debounce avoids reloading mid-copy when a hook writes cert and key sequentially. The initial poll records a baseline so boot does not bounce listeners.

Internal: interval from :cert_watch_interval_ms (default 60 seconds).

RFCs

  • RFC 5766 (TURN over TLS listeners reloaded)

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the certificate file watcher GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

Starts the certificate file watcher GenServer.