Skip to content

Clarify semantics for SetRecords, GetRecords and Close #145

@mjl-

Description

@mjl-

The libdns providers made it possible for me to make https://github.com/mjl-/dnsclay, providing a standard DNS UPDATE/AXFR/NOTIFY interface for all these providers with their custom APIs. Great to have so many! I ran into some questions about the semantics of the Records methods.

For SetRecords, I wonder about the semantics with resource record sets with more than 1 already existing record. Should provider implementations be grouping their records parameter into RR sets, and then replacing the entire existing set, deleting any other existing records in those sets that are no longer mentioned? Perhaps it makes sense to only specify behaviour for providers with IDs for records: SetRecords would update just those records. Callers can then use DeleteRecords and AppendRecords to remove from/add records to a record set. It could be good to mention the concept of resource record set in the docs, so implementers are aware of those semantics, provider APIs may need special handling (like with the route53 provider).

For GetRecords, are SOA and DNSSEC-related records like RRSIG, NSEC, NSEC3 supposed to be returned? I ran into a few that don't return the SOA record, which is likely the fault of the DNS operator API. For DNSSEC, some DNS operators will generate those records on demand, and won't have them stored in the zone, while others will, so in practice I suspect this will be optional. May be good to document so consumers know what to expect.

Perhaps a Provider should have an (optional?) Close method? So e.g. http.Clients with custom http.Transports (directadmin, inwx) can be closed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions