pub struct LimitsSection {
pub max_memories_per_day: Option<i64>,
pub max_storage_bytes: Option<i64>,
pub max_links_per_day: Option<i64>,
pub max_page_size: Option<usize>,
}Expand description
v0.7.x — [limits] sectioned operator-tunable capacity limits.
Wire format:
[limits]
max_memories_per_day = 10000000 # per-(agent, namespace) daily write quota
max_storage_bytes = 1073741824 # per-(agent, namespace) lifetime byte cap
max_links_per_day = 5000 # per-(agent, namespace) daily link quota
max_page_size = 1000 # list/bulk request page-size ceilingEvery field is optional; an omitted (or non-positive) value falls
through to the compiled default (crate::quotas::DEFAULT_MAX_* for
the three quota knobs, crate::handlers::MAX_BULK_SIZE for the
page-size cap). Resolved via AppConfig::resolve_limits, which
also honours the AI_MEMORY_MAX_* env overrides at higher
precedence than the section.
Operator guidance for max_page_size. This bounds the number of
rows materialised into a single HTTP list response AND the number of
items accepted in a single bulk / federation-sync request. It is a
per-request in-memory bound, NOT a rate limit: a single request that
asks for (or carries) millions of rows allocates them all at once.
Raise it for bulk verification of a known-small corpus; for
genuinely large datasets paginate with ?offset= / ?since= rather
than removing the bound.
Fields§
§max_memories_per_day: Option<i64>Per-(agent, namespace) daily memory-write ceiling stamped at quota-row auto-insert. Folds nothing legacy; new at v0.7.x.
max_storage_bytes: Option<i64>Per-(agent, namespace) lifetime storage cap in bytes.
max_links_per_day: Option<i64>Per-(agent, namespace) daily link-creation ceiling.
max_page_size: Option<usize>Maximum items returned in a single list response / accepted in a single bulk or federation-sync request.
Trait Implementations§
Source§impl Clone for LimitsSection
impl Clone for LimitsSection
Source§fn clone(&self) -> LimitsSection
fn clone(&self) -> LimitsSection
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 LimitsSection
impl Debug for LimitsSection
Source§impl Default for LimitsSection
impl Default for LimitsSection
Source§fn default() -> LimitsSection
fn default() -> LimitsSection
Source§impl<'de> Deserialize<'de> for LimitsSection
impl<'de> Deserialize<'de> for LimitsSection
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>,
impl Eq for LimitsSection
Source§impl PartialEq for LimitsSection
impl PartialEq for LimitsSection
Source§fn eq(&self, other: &LimitsSection) -> bool
fn eq(&self, other: &LimitsSection) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for LimitsSection
impl Serialize for LimitsSection
impl StructuralPartialEq for LimitsSection
Auto Trait Implementations§
impl Freeze for LimitsSection
impl RefUnwindSafe for LimitsSection
impl Send for LimitsSection
impl Sync for LimitsSection
impl Unpin for LimitsSection
impl UnsafeUnpin for LimitsSection
impl UnwindSafe for LimitsSection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more