cloudflare_dns_operator/context.rs
1use crate::dns_check::DnsCheckSender;
2use std::collections::HashMap;
3use tokio::sync::Mutex;
4
5/// Holds state shared by the controller and other processes such as the DNS watcher.
6pub struct Context {
7 pub client: kube::Client,
8 pub cloudflare_api_token: String,
9 pub do_dns_check: bool,
10 pub dns_check_tx: DnsCheckSender,
11 /// Maps CloudflareDNSRecord `{ns}:{name}` keys to DNS lookup results.
12 pub dns_lookup_success: Mutex<HashMap<String, bool>>,
13}