mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-10 22:45:02 +00:00
19 lines
392 B
Rust
19 lines
392 B
Rust
|
pub mod rate_limiter;
|
||
|
|
||
|
use super::{IPAddr, Settings};
|
||
|
use crate::api::APIError;
|
||
|
use failure::Error;
|
||
|
use log::warn;
|
||
|
use rate_limiter::RateLimiter;
|
||
|
use std::collections::HashMap;
|
||
|
use std::sync::Arc;
|
||
|
use std::sync::Mutex;
|
||
|
use std::time::SystemTime;
|
||
|
use strum::IntoEnumIterator;
|
||
|
|
||
|
#[derive(Debug, Clone)]
|
||
|
pub struct RateLimitInfo {
|
||
|
pub rate_limiter: Arc<Mutex<RateLimiter>>,
|
||
|
pub ip: IPAddr,
|
||
|
}
|