pub struct ServerBuilder<B> { /* private fields */ }Expand description
A builder for an Ora server.
Implementations§
Source§impl<B> ServerBuilder<B>
impl<B> ServerBuilder<B>
Sourcepub fn new(backend: B, options: ServerOptions) -> Self
pub fn new(backend: B, options: ServerOptions) -> Self
Create a new Ora server builder with the given backend.
Sourcepub fn delete_history_after(self, duration: Duration) -> Self
pub fn delete_history_after(self, duration: Duration) -> Self
Set the duration after which historical data is deleted.
By default, historical data is retained indefinitely.
Sourcepub fn shutdown_grace_period(self, duration: Duration) -> Self
pub fn shutdown_grace_period(self, duration: Duration) -> Self
Set the shutdown grace period after which all executions are cancelled.
Defaults to 15 seconds.
Source§impl<B> ServerBuilder<B>where
B: Backend,
impl<B> ServerBuilder<B>where
B: Backend,
Sourcepub fn spawn(self) -> ServerHandle<B>
pub fn spawn(self) -> ServerHandle<B>
Sourcepub fn spawn_with_wg(self, wg: WaitGroupHandle) -> ServerHandle<B>
pub fn spawn_with_wg(self, wg: WaitGroupHandle) -> ServerHandle<B>
Spawn the server using the given wait group handle.
Stopping the server will be possible only via the provided wait group.
Auto Trait Implementations§
impl<B> Freeze for ServerBuilder<B>
impl<B> RefUnwindSafe for ServerBuilder<B>where
B: RefUnwindSafe,
impl<B> Send for ServerBuilder<B>
impl<B> Sync for ServerBuilder<B>
impl<B> Unpin for ServerBuilder<B>
impl<B> UnsafeUnpin for ServerBuilder<B>
impl<B> UnwindSafe for ServerBuilder<B>where
B: RefUnwindSafe,
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> 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