Record auth success by method.
(&self, method: &str)
| 103 | |
| 104 | /// Record auth success by method. |
| 105 | pub fn record_auth_success(&self, method: &str) { |
| 106 | match method { |
| 107 | "password" | "scram" => self.auth_success_password.fetch_add(1, Ordering::Relaxed), |
| 108 | "api_key" => self.auth_success_api_key.fetch_add(1, Ordering::Relaxed), |
| 109 | "jwt" => self.auth_success_jwt.fetch_add(1, Ordering::Relaxed), |
| 110 | "certificate" => self |
| 111 | .auth_success_certificate |
| 112 | .fetch_add(1, Ordering::Relaxed), |
| 113 | "trust" => self.auth_success_trust.fetch_add(1, Ordering::Relaxed), |
| 114 | _ => 0, |
| 115 | }; |
| 116 | } |
| 117 | |
| 118 | /// Record auth failure by reason. |
| 119 | pub fn record_auth_failure(&self, reason: &str) { |
no outgoing calls