From 4bcc848bb178d9e4372ba13b750d620cabc2a9ac Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 16 Jan 2021 21:38:22 -0500 Subject: move poking services into app boot after systemd notify Signed-off-by: Christine Dodrill --- lib/cfcache/examples/purge.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/cfcache/examples/purge.rs (limited to 'lib/cfcache/examples') diff --git a/lib/cfcache/examples/purge.rs b/lib/cfcache/examples/purge.rs new file mode 100644 index 0000000..22c81a4 --- /dev/null +++ b/lib/cfcache/examples/purge.rs @@ -0,0 +1,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://christine.website/.within/health".to_string()]) + .await?; + + Ok(()) +} -- cgit v1.2.3