pub struct GatewayConfig {
pub enabled: bool,
pub routes: Vec<GatewayRoute>,
pub catalog: Option<GatewayCatalog>,
pub auth_scheme: String,
pub inference_path_prefix: String,
}Expand description
Runtime gateway configuration: the post-resolution shape every
non-loader caller sees. The catalog field, when present, is fully
loaded — Path indirection has already been resolved.
Not Deserialize: the only legal construction paths are
GatewayConfigSpec::resolve for the production loader and direct
struct-literal construction in tests.
Fields§
§enabled: bool§routes: Vec<GatewayRoute>§catalog: Option<GatewayCatalog>§auth_scheme: String§inference_path_prefix: StringImplementations§
Source§impl GatewayConfig
impl GatewayConfig
pub fn find_route(&self, model: &str) -> Option<&GatewayRoute>
pub fn is_model_exposed(&self, model: &str) -> bool
pub fn validate(&self) -> GatewayResult<()>
Sourcepub fn to_spec(&self) -> GatewayConfigSpec
pub fn to_spec(&self) -> GatewayConfigSpec
Convert a runtime config back to the on-disk spec form, inlining the loaded catalog. Used when persisting a resolved profile back to YAML.
Trait Implementations§
Source§impl Clone for GatewayConfig
impl Clone for GatewayConfig
Source§fn clone(&self) -> GatewayConfig
fn clone(&self) -> GatewayConfig
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 GatewayConfig
impl Debug for GatewayConfig
Auto Trait Implementations§
impl Freeze for GatewayConfig
impl RefUnwindSafe for GatewayConfig
impl Send for GatewayConfig
impl Sync for GatewayConfig
impl Unpin for GatewayConfig
impl UnsafeUnpin for GatewayConfig
impl UnwindSafe for GatewayConfig
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