pub struct RestConf {Show 22 fields
pub service: ServiceConf,
pub host: String,
pub port: u16,
pub cert_file: Option<String>,
pub key_file: Option<String>,
pub max_connections: i64,
pub max_bytes: i64,
pub timeout: Option<u64>,
pub cpu_threshold: i64,
pub signature: Option<SignatureConf>,
pub middlewares: MiddlewaresConf,
pub trace_ignore_paths: Vec<String>,
pub workers: Option<usize>,
pub reuse_port: bool,
pub cpu_affinity: Option<Vec<usize>>,
pub http2: bool,
pub h2c: bool,
pub http1_keep_alive: bool,
pub http1_max_buf_size: Option<usize>,
pub tcp_keepalive_secs: Option<u64>,
pub rate_limit: Option<RateLimitConf>,
pub concurrency_limit: Option<usize>,
}Expand description
RestConf definition (rest package).
Fields§
§service: ServiceConfEquivalent to embedding service.ServiceConf
host: String§port: u16§cert_file: Option<String>§key_file: Option<String>§max_connections: i64§max_bytes: i64§timeout: Option<u64>Per-request timeout in milliseconds. None disables it. Default 3000ms.
cpu_threshold: i64range: [0, 1000)
signature: Option<SignatureConf>§middlewares: MiddlewaresConfThere are default values for all the items in Middlewares.
trace_ignore_paths: Vec<String>TraceIgnorePaths is paths blacklist for trace middleware.
workers: Option<usize>Tokio worker threads (None => tokio default).
reuse_port: boolEnable SO_REUSEPORT multi-listener (Linux recommended for multi-core).
cpu_affinity: Option<Vec<usize>>CPU affinity (Linux only). Ignored on unsupported platforms.
http2: boolEnable HTTP/2 (TLS or h2c). Default off (HTTP/1.1).
h2c: boolEnable h2c (HTTP/2 without TLS). Default off.
http1_keep_alive: boolhttp1 keep-alive toggle.
http1_max_buf_size: Option<usize>http1 max buffer size.
tcp_keepalive_secs: Option<u64>TCP keepalive seconds (None => OS default).
rate_limit: Option<RateLimitConf>Global rate limit config (tokens/s, burst). None => disabled.
concurrency_limit: Option<usize>Global concurrent in-flight request limit. None => disabled.