DNS.Zone.Store (DNS v0.4.1)

View Source

Zone storage system for managing DNS zones in memory.

Provides ETS-based storage for zone management with optional persistence.

Summary

Functions

Clear all zones.

Delete a zone.

Ensure the zone store is initialized.

Get a zone by name.

Get zones by type.

Initialize the zone store.

List all zones.

Store a zone.

Check if a zone exists.

Functions

clear()

@spec clear() :: :ok

Clear all zones.

delete_zone(name)

@spec delete_zone(String.t() | DNS.Zone.Name.t()) :: :ok

Delete a zone.

ensure_initialized()

@spec ensure_initialized() :: :ok

Ensure the zone store is initialized.

get_zone(name)

@spec get_zone(String.t() | DNS.Zone.Name.t()) ::
  {:ok, DNS.Zone.t()} | {:error, :not_found}

Get a zone by name.

get_zones_by_type(type)

@spec get_zones_by_type(DNS.Zone.zone_type()) :: [DNS.Zone.t()]

Get zones by type.

init()

@spec init() :: :ok

Initialize the zone store.

list_zones()

@spec list_zones() :: [DNS.Zone.t()]

List all zones.

put_zone(zone)

@spec put_zone(DNS.Zone.t()) :: {:ok, DNS.Zone.t()}

Store a zone.

zone_exists?(name)

@spec zone_exists?(String.t() | DNS.Zone.Name.t()) :: boolean()

Check if a zone exists.