pub struct FlightSqlServerBuilder { /* private fields */ }Implementations§
Source§impl FlightSqlServerBuilder
impl FlightSqlServerBuilder
Sourcepub fn with_view_factory_fn<F, Fut>(self, f: F) -> Selfwhere
F: FnOnce(Arc<RuntimeEnv>, Arc<DataLakeConnection>) -> Fut + Send + 'static,
Fut: Future<Output = Result<ViewFactory>> + Send + 'static,
pub fn with_view_factory_fn<F, Fut>(self, f: F) -> Selfwhere
F: FnOnce(Arc<RuntimeEnv>, Arc<DataLakeConnection>) -> Fut + Send + 'static,
Fut: Future<Output = Result<ViewFactory>> + Send + 'static,
Override the default view factory with a custom closure.
The closure receives the runtime and data lake created by the builder.
Sourcepub fn with_session_configurator(
self,
cfg: Arc<dyn SessionConfigurator>,
) -> Self
pub fn with_session_configurator( self, cfg: Arc<dyn SessionConfigurator>, ) -> Self
Override the default session configurator.
By default the builder loads static tables from MICROMEGAS_STATIC_TABLES_URL.
Use this to replace that behavior entirely.
Sourcepub fn with_auth_provider(self, provider: Arc<dyn AuthProvider>) -> Self
pub fn with_auth_provider(self, provider: Arc<dyn AuthProvider>) -> Self
Set an explicit auth provider.
Sourcepub fn with_default_auth(self) -> Self
pub fn with_default_auth(self) -> Self
Use the default auth provider from env vars during build.
Errors if no auth providers are configured (fail-fast).
Sourcepub fn with_max_decoding_message_size(self, bytes: usize) -> Self
pub fn with_max_decoding_message_size(self, bytes: usize) -> Self
Set the max decoding message size (default: 100 MB).
Sourcepub fn with_listen_addr(self, addr: SocketAddr) -> Self
pub fn with_listen_addr(self, addr: SocketAddr) -> Self
Set the listen address (default: 0.0.0.0:50051).
Sourcepub fn with_shutdown_grace(self, grace: Duration) -> Self
pub fn with_shutdown_grace(self, grace: Duration) -> Self
Set the grace period for graceful shutdown on SIGTERM (default: 25s).
Sourcepub fn with_lakehouse(self, lakehouse: Arc<LakehouseContext>) -> Self
pub fn with_lakehouse(self, lakehouse: Arc<LakehouseContext>) -> Self
Inject a pre-built LakehouseContext instead of calling LakehouseContext::from_env.
Useful for the monolith, which constructs one shared context for all lake-backed roles.
Sourcepub fn with_shutdown(
self,
shutdown: impl Future<Output = ()> + Send + 'static,
) -> Self
pub fn with_shutdown( self, shutdown: impl Future<Output = ()> + Send + 'static, ) -> Self
Inject a custom shutdown future instead of the default wait_for_sigterm().
The monolith passes fanout.subscribe() here so all roles shut down from one signal.
Sourcepub async fn build_and_serve(self) -> Result<()>
pub async fn build_and_serve(self) -> Result<()>
Build and run the FlightSQL server.
Runs the full setup sequence and blocks until the server shuts down.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlightSqlServerBuilder
impl !RefUnwindSafe for FlightSqlServerBuilder
impl Send for FlightSqlServerBuilder
impl !Sync for FlightSqlServerBuilder
impl Unpin for FlightSqlServerBuilder
impl !UnwindSafe for FlightSqlServerBuilder
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].