pub struct PacingConfig {
pub min_mutation_interval_ms: Option<u64>,
pub retry_backoff_ms: Option<u64>,
pub retry_budget_ms: Option<u64>,
}Expand description
How fast this source writes, and how long it waits out a rate-limit refusal.
Configurable because a GitHub Enterprise installation sets its own limits and an operator who has already been refused may want to go slower still — not because the defaults are guesses.
Fields§
§min_mutation_interval_ms: Option<u64>Shortest interval between two content-creating mutations, in milliseconds.
Zero sends them as fast as they are asked for, which is what a fixture server on
loopback wants and what no board on github.com does. At most MAX_PACING_MS.
retry_backoff_ms: Option<u64>First wait when a rate-limit refusal carries no hint, in milliseconds. Each
further wait of the same call doubles it. At most MAX_PACING_MS, and never
zero while there is a budget to spend, because a schedule of zero-length waits
consumes none of it and so never ends.
retry_budget_ms: Option<u64>Total time one call may spend waiting out rate limits, in milliseconds.
Zero reports the refusal rather than waiting at all. At most MAX_PACING_MS:
the bound is what makes this a wait rather than a hang.
Trait Implementations§
Source§impl Clone for PacingConfig
impl Clone for PacingConfig
Source§fn clone(&self) -> PacingConfig
fn clone(&self) -> PacingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PacingConfig
impl Debug for PacingConfig
Source§impl Default for PacingConfig
impl Default for PacingConfig
Source§fn default() -> PacingConfig
fn default() -> PacingConfig
Source§impl<'de> Deserialize<'de> for PacingConfigwhere
PacingConfig: Default,
impl<'de> Deserialize<'de> for PacingConfigwhere
PacingConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PacingConfig
impl JsonSchema for PacingConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more