use async_trait::async_trait;
use eyre::Result;
use std::fmt::Debug;
use crate::{changes::Changes, domain_filter::DomainFilter, endpoint::Endpoint};
#[async_trait]
pub trait Provider: Send + Sync + Debug {
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)
}
}