pub struct GrpcSourceBuilder { /* private fields */ }Expand description
Implementations§
Source§impl GrpcSourceBuilder
impl GrpcSourceBuilder
Sourcepub fn new(id: impl Into<String>) -> Self
pub fn new(id: impl Into<String>) -> Self
Create a new gRPC source builder with the given ID and default values
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
Set the optional service endpoint
Sourcepub fn with_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_timeout_ms(self, timeout_ms: u64) -> Self
Set the request timeout in milliseconds
Sourcepub fn with_dispatch_mode(self, mode: DispatchMode) -> Self
pub fn with_dispatch_mode(self, mode: DispatchMode) -> Self
Set the dispatch mode for this source
Sourcepub fn with_dispatch_buffer_capacity(self, capacity: usize) -> Self
pub fn with_dispatch_buffer_capacity(self, capacity: usize) -> Self
Set the dispatch buffer capacity for this source
Sourcepub fn with_bootstrap_provider(
self,
provider: impl BootstrapProvider + 'static,
) -> Self
pub fn with_bootstrap_provider( self, provider: impl BootstrapProvider + 'static, ) -> Self
Set the bootstrap provider for this source
Sourcepub fn with_auto_start(self, auto_start: bool) -> Self
pub fn with_auto_start(self, auto_start: bool) -> Self
Set whether this source should auto-start when DrasiLib starts.
Default is true. Set to false if this source should only be
started manually via start_source().
Sourcepub fn with_config(self, config: GrpcSourceConfig) -> Self
pub fn with_config(self, config: GrpcSourceConfig) -> Self
Set the full configuration at once
Sourcepub fn build(self) -> Result<GrpcSource>
pub fn build(self) -> Result<GrpcSource>
Auto Trait Implementations§
impl Freeze for GrpcSourceBuilder
impl !RefUnwindSafe for GrpcSourceBuilder
impl Send for GrpcSourceBuilder
impl Sync for GrpcSourceBuilder
impl Unpin for GrpcSourceBuilder
impl UnsafeUnpin for GrpcSourceBuilder
impl !UnwindSafe for GrpcSourceBuilder
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