pub struct GrpcServerBuilder { /* private fields */ }Implementations§
Source§impl GrpcServerBuilder
impl GrpcServerBuilder
pub fn unary<Req, Res, F, Fut>(self, method: impl Into<String>, f: F) -> Self
Sourcepub fn unary_with_request<Req, Res, F, Fut>(
self,
method: impl Into<String>,
f: F,
) -> Self
pub fn unary_with_request<Req, Res, F, Fut>( self, method: impl Into<String>, f: F, ) -> Self
Unary handler with access to the incoming HTTP sova_core::Request.
Sourcepub fn client(self, base: impl Into<String>) -> Self
pub fn client(self, base: impl Into<String>) -> Self
Also install an outbound client (BFF: serve + call remote RPC).
Sourcepub fn client_from_env(self) -> Self
pub fn client_from_env(self) -> Self
Outbound client base URL from GRPC_URL.
Sourcepub fn bind(self, addr: impl Into<String>) -> Self
pub fn bind(self, addr: impl Into<String>) -> Self
Also listen on a dedicated socket (BackgroundService).
Sourcepub fn mount(self, enabled: bool) -> Self
pub fn mount(self, enabled: bool) -> Self
Mount unary paths on the main HTTP app (default true).
pub fn build(self) -> Grpc
Trait Implementations§
Source§impl From<GrpcServerBuilder> for Grpc
impl From<GrpcServerBuilder> for Grpc
Source§fn from(b: GrpcServerBuilder) -> Self
fn from(b: GrpcServerBuilder) -> Self
Converts to this type from the input type.
Source§impl Plugin for GrpcServerBuilder
impl Plugin for GrpcServerBuilder
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl Freeze for GrpcServerBuilder
impl RefUnwindSafe for GrpcServerBuilder
impl Send for GrpcServerBuilder
impl Sync for GrpcServerBuilder
impl Unpin for GrpcServerBuilder
impl UnsafeUnpin for GrpcServerBuilder
impl UnwindSafe for GrpcServerBuilder
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