Ferricstore.Flow.Admission (ferricstore v0.4.3)

Copy Markdown View Source

Low-overhead Flow write admission gate.

This gate is intentionally tiny on the hot path: create commands do one atomic read. The operational guard owns the expensive RSS/disk checks and updates this projection periodically.

Summary

Functions

clear_create_pause()

@spec clear_create_pause() :: :ok

init()

@spec init() :: :ok

overload_error(default_reason \\ :operational_pressure, default_retry_after_ms \\ 1000)

@spec overload_error(atom(), non_neg_integer()) :: {:error, binary()}

pause_creates(reason, retry_after_ms)

@spec pause_creates(atom(), non_neg_integer()) :: :ok

reject_new_creates?()

@spec reject_new_creates?() :: boolean()

status()

@spec status() :: map()