pub struct UpstreamDefinition {Show 18 fields
pub name: String,
pub transport: String,
pub protocol: String,
pub role: String,
pub resolve: String,
pub resource_ref: String,
pub secret: String,
pub auth_kind: String,
pub auth_name: Option<String>,
pub auth_prefix: Option<String>,
pub map: Vec<UpstreamMapRule>,
pub reconnect: Option<UpstreamReconnect>,
pub overflow: Option<String>,
pub backpressure_credit: Option<i64>,
pub preset: Option<String>,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Expand description
upstream Name { transport:, protocol:, role:, resolve:, secret:, auth:, map: [...], reconnect: {...}, overflow:, backpressure: credit(n) }
§Fase 80.b — the client dual of socket: axon dials OUT to a third-party
vendor (STT/TTS/realtime speech APIs). The axon-facing interface is a
declared session (referenced by protocol:, same field meaning as
socket) of which axon plays role:; the vendor side is realised by the
map: projection rules — a compile-time-total transcoding contract
(§80.c, axon-T849). resolve:/secret: name per-tenant config keys,
never URL/credential literals (axon-T850) — the same “config, not code”
property §58.g gave tool, extended to persistent duplex streams.
Fields§
§name: String§transport: StringWire transport axon dials. Closed catalog; v1 sole member websocket.
protocol: StringThe referenced session declaration’s name — the axon-facing protocol.
role: StringWhich of the session’s two roles axon plays; the peer role is the
vendor’s, realised by the map: transcoding, never by axon code.
resolve: StringPer-tenant config key holding the vendor URL (dot-separated,
SecretKeyPolicy-shaped — never a URL literal).
resource_ref: String§Fase 114.u — the resource this upstream’s channel runs on
(upstream X { resource: Api }). When present, the upstream DERIVES
its dial address from resource.endpoint (a per-tenant config key,
axon-T944) and its max concurrent connection INSTANCES from
resource.capacity — frames are already governed by
backpressure_credit, so capacity bounds CONNECTIONS, never frames
(making it frames would state one fact twice). Mutually exclusive
with resolve: (axon-T951): resource: beside a resolve: would
declare the channel’s address twice — the §113 islands defect.
Authority attenuation: the resource encapsulates its own address
resolution; the upstream only names WHICH channel it rides.
secret: StringPer-tenant secret binding for the vendor credential (same charset).
auth_kind: StringAuth handshake kind: header | query | signed_url.
auth_name: Option<String>Header/query-param name (header("Authorization") / query("token")).
auth_prefix: Option<String>Optional header value prefix (header("Authorization", "Token ")).
map: Vec<UpstreamMapRule>The wire↔session transcoding contract; totality checked at §80.c.
reconnect: Option<UpstreamReconnect>reconnect: { backoff_ms:, max_attempts:, on_exhausted: }.
overflow: Option<String>Outbound-queue policy when the VENDOR is the slow side — a member of
the existing BackpressurePolicy catalog. None ⇒ fail (honest
default: no silently-lossy audio unless the adopter opts in).
backpressure_credit: Option<i64>Axon-facing credit window, identical semantics to socket.
preset: Option<String>§Fase 80.f — set when declared via upstream X from Preset@vN {…};
carries the Preset@vN reference the desugar pass expanded.
loc: Loc§leading_trivia: Vec<Trivia>Fase 14.b — leading comment trivia.
trailing_trivia: Vec<Trivia>Fase 14.b — trailing comment trivia.
Trait Implementations§
Source§impl Debug for UpstreamDefinition
impl Debug for UpstreamDefinition
Source§impl Default for UpstreamDefinition
impl Default for UpstreamDefinition
Source§fn default() -> UpstreamDefinition
fn default() -> UpstreamDefinition
Auto Trait Implementations§
impl Freeze for UpstreamDefinition
impl RefUnwindSafe for UpstreamDefinition
impl Send for UpstreamDefinition
impl Sync for UpstreamDefinition
impl Unpin for UpstreamDefinition
impl UnsafeUnpin for UpstreamDefinition
impl UnwindSafe for UpstreamDefinition
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> 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