pub struct Server { /* private fields */ }Expand description
The Terrazzo Gateway server.
Implementations§
Source§impl Server
impl Server
Sourcepub async fn get_certificate(
self: Arc<Self>,
__arg1: Json<GetCertificateRequest<AuthCode>>,
) -> Result<String, HttpError<GetCertificateError>>
pub async fn get_certificate( self: Arc<Self>, __arg1: Json<GetCertificateRequest<AuthCode>>, ) -> Result<String, HttpError<GetCertificateError>>
API to issue client certificates.
Endpoint: “/remote/certificate”
Source§impl Server
impl Server
Sourcepub async fn tunnel(
self: Arc<Self>,
client_id: Option<ClientId>,
__arg2: Path<ClientName>,
web_socket: WebSocketUpgrade,
) -> impl IntoResponse
pub async fn tunnel( self: Arc<Self>, client_id: Option<ClientId>, __arg2: Path<ClientName>, web_socket: WebSocketUpgrade, ) -> impl IntoResponse
API to serve tunnel connections
Endpoint: “/remote/tunnel/{client_name}”
Source§impl Server
impl Server
Sourcepub async fn run<C: GatewayConfig>(
config: C,
) -> Result<(Arc<Self>, ServerHandle<()>, Receiver<RunGatewayError>), GatewayError<C>>
pub async fn run<C: GatewayConfig>( config: C, ) -> Result<(Arc<Self>, ServerHandle<()>, Receiver<RunGatewayError>), GatewayError<C>>
Runs the server with the given configuration.
The server runs in the background, the method returns a ServerHandle to stop the server.
It also returns future RunGatewayError in case the server fails to start-up.
Sourcepub fn connections(&self) -> &Connections
pub fn connections(&self) -> &Connections
Returns the list of client connections.
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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 moreSource§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