pub struct GatewayConfigSpec {
pub enabled: bool,
pub routes: Vec<GatewayRoute>,
pub default_provider: Option<ProviderId>,
pub auth_scheme: String,
pub inference_path_prefix: String,
}Expand description
On-disk gateway configuration: the exact shape accepted under
gateway: in a profile YAML document.
Project to the runtime GatewayConfig via Self::resolve.
Fields§
§enabled: bool§routes: Vec<GatewayRoute>§default_provider: Option<ProviderId>Provider that absorbs any model not matched by an explicit route.
When set, the gateway stops being a closed allowlist: an unmatched
model is forwarded to this provider instead of denied.
auth_scheme: String§inference_path_prefix: StringImplementations§
Source§impl GatewayConfigSpec
impl GatewayConfigSpec
Sourcepub fn resolve(self) -> GatewayConfig
pub fn resolve(self) -> GatewayConfig
A pure field map: the gateway owns no catalog file, so resolution performs no I/O.
Trait Implementations§
Source§impl Clone for GatewayConfigSpec
impl Clone for GatewayConfigSpec
Source§fn clone(&self) -> GatewayConfigSpec
fn clone(&self) -> GatewayConfigSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GatewayConfigSpec
impl Debug for GatewayConfigSpec
Source§impl Default for GatewayConfigSpec
impl Default for GatewayConfigSpec
Source§impl<'de> Deserialize<'de> for GatewayConfigSpec
impl<'de> Deserialize<'de> for GatewayConfigSpec
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for GatewayConfigSpec
impl JsonSchema for GatewayConfigSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GatewayConfigSpec
impl RefUnwindSafe for GatewayConfigSpec
impl Send for GatewayConfigSpec
impl Sync for GatewayConfigSpec
impl Unpin for GatewayConfigSpec
impl UnsafeUnpin for GatewayConfigSpec
impl UnwindSafe for GatewayConfigSpec
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
Mutably borrows from an owned value. Read more