diff options
| author | Christine Dodrill <me@christine.website> | 2021-01-16 21:38:22 -0500 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2021-01-16 21:38:22 -0500 |
| commit | 4bcc848bb178d9e4372ba13b750d620cabc2a9ac (patch) | |
| tree | e2a97a5a03c934de6307b3d543d5f4b249675ce7 /lib/cfcache/examples | |
| parent | 17af42bc698237d1560b8add144641ae3950b469 (diff) | |
| download | xesite-4bcc848bb178d9e4372ba13b750d620cabc2a9ac.tar.xz xesite-4bcc848bb178d9e4372ba13b750d620cabc2a9ac.zip | |
move poking services into app boot after systemd notify
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'lib/cfcache/examples')
| -rw-r--r-- | lib/cfcache/examples/purge.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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(()) +} |
