aboutsummaryrefslogtreecommitdiff
path: root/lib/cfcache/examples/purge.rs
blob: 43e269f0ab5a5514a7d8d73cec0e5954be032bc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use eyre::Result;

#[tokio::main]
async fn main() -> Result<()> {
    kankyo::init()?;

    let key = std::env::var("CF_TOKEN")?;
    let zone_id = std::env::var("CF_ZONE_ID")?;

    let cli = cfcache::Client::new(key, zone_id)?;
    cli.purge(vec!["https://xeiaso.net/.within/health".to_string()])
        .await?;

    Ok(())
}