Provider

Trait Provider 

Source
pub trait Provider:
    Send
    + Sync
    + Debug {
    // Required methods
    fn domain_filter<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DomainFilter> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn records<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<Endpoint>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn apply_changes<'life0, 'async_trait>(
        &'life0 self,
        changes: Changes,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn adjust_endpoints<'life0, 'async_trait>(
        &'life0 self,
        endpoints: Vec<Endpoint>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Endpoint>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Definition of the webhook interface. This interface should be implemented by DNS service provider that wish to communicate with ExternalDNS.

Required Methods§

Source

fn domain_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DomainFilter> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the domains the provider could handle.

Source

fn records<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<Endpoint>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return existing (previously registered by ExternalDNS) DNS records.

Source

fn apply_changes<'life0, 'async_trait>( &'life0 self, changes: Changes, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Make records changes asked by ExternalDNS.

Provided Methods§

Source

fn adjust_endpoints<'life0, 'async_trait>( &'life0 self, endpoints: Vec<Endpoint>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Endpoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Confirmation by providers, if any records should be adjusted, before making changes.

Implementors§