Karta.DNS.Change (Karta v1.0.0)

One difference between the records Karta publishes for a domain and what the DNS server holds (Karta.DNS.Publish.plan/2), at one name and type:

  • :create - nothing there yet: Karta adds its RRset;
  • :update - Karta's own RRset holds other records or another TTL: Karta replaces it;
  • :adopt - an RRset Karta did not write already holds exactly Karta's records: Karta marks it as its own (and so removes it when it is no longer needed);
  • :delete - Karta's own RRset that is no longer needed (a retired key, a tracking host removed): Karta removes it;
  • :conflict - an RRset Karta did not write is in the way, or the name is in a zone Karta may not write to: nothing is changed, and reason says why.

records are the contents Karta publishes (none for a removal), current those the server holds, both in zone-file presentation form; for records of another type in the way, each with its type ("A 192.0.2.1"). owner is the domain the records belong to, which a provider stores with them (Karta.DNS.RRSet).

Summary

Functions

True for the changes that write to the server (all but conflicts).

Types

action()

@type action() :: :create | :update | :adopt | :delete | :conflict

t()

@type t() :: %Karta.DNS.Change{
  action: action(),
  current: [String.t()],
  name: String.t(),
  owner: String.t() | nil,
  reason: String.t() | nil,
  records: [String.t()],
  ttl: non_neg_integer() | nil,
  type: String.t(),
  zone: String.t() | nil
}

Functions

writes?(change)

@spec writes?(t()) :: boolean()

True for the changes that write to the server (all but conflicts).