Defdo.DDNS
(defdo_ddns v0.5.0)
Copy Markdown
Public API for defdo_ddns when used as a dependency.
This module provides one-shot and monitored checkups, plus a small convenience surface for common DNS operations.
Summary
Functions
Returns API client credentials currently loaded in memory.
Runs a checkup through the monitor process if it is running. Falls back to a one-shot checkup when monitor is disabled.
Runs a one-shot checkup without requiring the monitor process.
Clears API client credentials from in-memory auth store.
Returns whether monitor startup is enabled in app config.
Returns whether the monitor process is currently running.
Replaces API client credentials in memory for multi-tenant-light auth mode.
Starts the monitor process manually.
Stops the monitor process if it is currently running.
Upserts a managed CNAME record using the internal DNS API logic.
Functions
Returns API client credentials currently loaded in memory.
By default tokens are redacted. Use api_clients(redact: false) only for trusted,
local debugging contexts.
@spec checkup() :: list()
Runs a checkup through the monitor process if it is running. Falls back to a one-shot checkup when monitor is disabled.
@spec checkup_once() :: list()
Runs a one-shot checkup without requiring the monitor process.
@spec clear_api_clients() :: :ok | {:error, term()}
Clears API client credentials from in-memory auth store.
See Defdo.Cloudflare.DDNS.get_all_cloudflare_config_domains/0.
@spec monitor_enabled?() :: boolean()
Returns whether monitor startup is enabled in app config.
@spec monitor_running?() :: boolean()
Returns whether the monitor process is currently running.
Replaces API client credentials in memory for multi-tenant-light auth mode.
Expected format: [ %{
"id" => "client-id",
"token" => "secret-token",
"allowed_base_domains" => ["example.com"]} ]
@spec start_monitor(keyword()) :: GenServer.on_start()
Starts the monitor process manually.
@spec stop_monitor(timeout()) :: :ok
Stops the monitor process if it is currently running.
Upserts a managed CNAME record using the internal DNS API logic.