pub struct GatewayServer { /* private fields */ }Expand description
Configuration-driven Actix gateway with bounded graceful draining.
Implementations§
Source§impl GatewayServer
impl GatewayServer
pub fn new(config: GatewayConfig) -> Result<Self, GatewayConfigError>
Sourcepub fn with_upstream_middleware<M>(
self,
name: impl Into<String>,
middleware: M,
) -> Result<Self, GatewayConfigError>where
M: GatewayMiddleware,
pub fn with_upstream_middleware<M>(
self,
name: impl Into<String>,
middleware: M,
) -> Result<Self, GatewayConfigError>where
M: GatewayMiddleware,
Registers a named policy referenced by configured upstream pools.
pub fn run(&self) -> Result<Server>
pub fn run_on(&self, listener: TcpListener) -> Result<Server>
pub async fn serve_until<F>(&self, shutdown: F) -> Result<()>
pub async fn serve_on_until<F>( &self, listener: TcpListener, shutdown: F, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for GatewayServer
impl !UnwindSafe for GatewayServer
impl Freeze for GatewayServer
impl Send for GatewayServer
impl Sync for GatewayServer
impl Unpin for GatewayServer
impl UnsafeUnpin for GatewayServer
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request