Skip to main content

admit_rate_limited_request_runtime_local

Function admit_rate_limited_request_runtime_local 

Source
pub fn admit_rate_limited_request_runtime_local(
    app: &AppRuntime,
    policy_key: &str,
    bucket_key: &str,
    maximum: usize,
    window_seconds: u64,
) -> Result<bool, i32>
Expand description

Atomically admits one request under a bounded state-backed rate-limit window.

§Parameters

§Returns

Returns the successful value produced by crate::runtime::dynamic::admit_rate_limited_request_runtime_local or an error when the operation fails.

§Errors

Returns an error value when crate::runtime::dynamic::admit_rate_limited_request_runtime_local cannot complete successfully.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::dynamic::admit_rate_limited_request_runtime_local.

§Examples

ⓘ
let _result = pharos_native::runtime::dynamic::admit_rate_limited_request_runtime_local(todo!(), todo!(), todo!(), todo!(), todo!());