| Crates.io | externaldns-webhook |
| lib.rs | externaldns-webhook |
| version | 2025.12.9 |
| created_at | 2024-11-26 10:33:58.321229+00 |
| updated_at | 2025-12-08 17:12:56.318605+00 |
| description | Interface (trait) for ExternalDns(v0.15.0) webhook. |
| homepage | |
| repository | https://github.com/Magicloud/externaldns-webhook |
| max_upload_size | |
| id | 1461442 |
| size | 92,339 |
This lib implenments External-DNS webhook interface. External-DNS uses this interface to communicate with non-built-in DNS service provider.
The first thing to care is:
trait Provider {
async fn domain_filter(&self) -> Result<DomainFilter>;
async fn records(&self) -> Result<Vec<Endpoint>>;
async fn apply_changes(&self, changes: Changes) -> Result<()>;
async fn adjust_endpoints(&self, endpoints: Vec<Endpoint>) -> Result<Vec<Endpoint>> {
Ok(endpoints)
}
}
The implementor must implement the first three functioons.
domain_filter tells External-DNS the rules to match the domains that this provider takes care.
records tells External-DNS all records the provider currently solves.
External-DNS tells apply_changes what (records) to CUD.
With this implementor, and an optional Status implementor, one can Webhook::new() to get a Webhook instance, then Webhook::start() to get everything working.
For more reference, please checkout the example, which is a fully functioned provider for DNSMasq, which I am using in my K3S.
Ref: webhook-provider.md