pub struct Gate { /* private fields */ }Expand description
The Gate – Thunder Dome’s core proxy loop with full interceptor chain.
Interceptor order (inbound, client -> server):
- Sentinel – authenticate on
initialize, resolve identity - Throttle – check rate limits and budget
- Ward – scan for injection patterns in tool arguments
- Policy – evaluate authorization rules
- Ledger – record the decision in the audit chain
Outbound (server -> client):
- Schema Pin – verify tools/list responses for drift (block Critical/High)
- Ward – scan outbound tool results for injection patterns
- Ledger – record outbound audit entry
Implementations§
Source§impl Gate
impl Gate
Sourcepub fn new(
config: GateConfig,
authenticators: Vec<Box<dyn Authenticator>>,
policy_engine: Option<SharedPolicyEngine>,
rate_limiter_config: RateLimiterConfig,
budget_config: BudgetTrackerConfig,
ledger: Ledger,
) -> Self
pub fn new( config: GateConfig, authenticators: Vec<Box<dyn Authenticator>>, policy_engine: Option<SharedPolicyEngine>, rate_limiter_config: RateLimiterConfig, budget_config: BudgetTrackerConfig, ledger: Ledger, ) -> Self
Create a new Gate with full interceptor chain.
The policy_engine parameter accepts an optional SharedPolicyEngine
(Arc<ArcSwap<PolicyEngine>>), which enables hot-reload. The gate reads
the current policy atomically on every request via load(), so swaps
performed by a [PolicyWatcher] are immediately visible without restart.
Sourcepub fn transparent(ledger: Ledger) -> Self
pub fn transparent(ledger: Ledger) -> Self
Create a transparent pass-through Gate (no security enforcement).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gate
impl !RefUnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
impl !UnwindSafe for Gate
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