#[non_exhaustive]pub struct SteeringConfig { /* private fields */ }Expand description
Turns steering on, and sets its two bounds. See
RequestHandlerBuilder::with_steering.
use a2a_protocol_server::SteeringConfig;
let config = SteeringConfig::new()
.with_inbox_capacity(4)
.with_max_message_size(8 * 1024);
assert_eq!(config.inbox_capacity(), 4);
assert_eq!(config.max_message_size(), 8 * 1024);Implementations§
Source§impl SteeringConfig
impl SteeringConfig
Sourcepub const fn new() -> SteeringConfig
pub const fn new() -> SteeringConfig
The defaults: DEFAULT_INBOX_CAPACITY messages of at most
DEFAULT_MAX_MESSAGE_SIZE bytes.
Sourcepub const fn with_inbox_capacity(self, capacity: usize) -> SteeringConfig
pub const fn with_inbox_capacity(self, capacity: usize) -> SteeringConfig
How many messages may wait in one turn’s inbox. A message that finds
the inbox full is refused with 503 and Retry-After, never dropped
and never waited for. build refuses 0: an inbox that holds nothing
refuses every message.
Sourcepub const fn with_max_message_size(self, bytes: usize) -> SteeringConfig
pub const fn with_max_message_size(self, bytes: usize) -> SteeringConfig
The largest message accepted, in bytes of its JSON; one byte over is
refused as too large. build refuses 0.
Sourcepub const fn with_notifications(self, on: bool) -> SteeringConfig
pub const fn with_notifications(self, on: bool) -> SteeringConfig
Whether a replica that handed a steering message to another one
through the store also tells it so at once, with PostgreSQL’s
NOTIFY, instead of leaving it to the other replica’s next look at
the store (every turn-claim renewal interval, one second by default).
Off by default, and only the PostgreSQL claim store sends one.
It holds a LISTEN session on a pooled connection, which breaks
behind a connection pooler in transaction mode (PgBouncer’s usual
setting): the pooler lends the session’s connection to another client,
and the next notification arrives in the middle of that client’s
statement. Measured against PgBouncer 1.26.1 on 2026-10-30, for the
halt store, which listens the same way. Turn it on only with a direct
connection to PostgreSQL. Nothing is lost by leaving it off: the
look every renewal interval delivers every message.
Sourcepub const fn inbox_capacity(&self) -> usize
pub const fn inbox_capacity(&self) -> usize
How many messages may wait in one turn’s inbox.
Sourcepub const fn max_message_size(&self) -> usize
pub const fn max_message_size(&self) -> usize
The largest message accepted, in bytes.
Sourcepub const fn notifications(&self) -> bool
pub const fn notifications(&self) -> bool
Whether a handed-off message is announced with NOTIFY.
Trait Implementations§
Source§impl Clone for SteeringConfig
impl Clone for SteeringConfig
Source§fn clone(&self) -> SteeringConfig
fn clone(&self) -> SteeringConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SteeringConfig
Source§impl Debug for SteeringConfig
impl Debug for SteeringConfig
Source§impl Default for SteeringConfig
impl Default for SteeringConfig
Source§fn default() -> SteeringConfig
fn default() -> SteeringConfig
impl Eq for SteeringConfig
Source§impl PartialEq for SteeringConfig
impl PartialEq for SteeringConfig
impl StructuralPartialEq for SteeringConfig
Auto Trait Implementations§
impl Forget for SteeringConfig
impl Freeze for SteeringConfig
impl Move for SteeringConfig
impl RefUnwindSafe for SteeringConfig
impl Send for SteeringConfig
impl Sync for SteeringConfig
impl Unpin for SteeringConfig
impl UnsafeUnpin for SteeringConfig
impl UnwindSafe for SteeringConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].