pub struct OssServer { /* private fields */ }Expand description
Implementations§
Source§impl OssServer
impl OssServer
Sourcepub async fn new(config: JammiConfig) -> Result<Self, ServerError>
pub async fn new(config: JammiConfig) -> Result<Self, ServerError>
Build an OSS server from JammiConfig. Validates the server
configuration up front (parses both bind addresses, rejects two
identical FIXED bind addresses — identical :0 ephemeral addresses
are allowed, since each resolves to a distinct port at bind),
constructs the engine session
(catalog, mutable tables, broker), and prepares the shared
metrics registry and readiness probe.
Sourcepub fn metrics(&self) -> Arc<MetricsRegistry>
pub fn metrics(&self) -> Arc<MetricsRegistry>
Shared handle to the metrics registry. Test fixtures and the gRPC services use this to increment counters.
Sourcepub fn session(&self) -> Arc<InferenceSession>
pub fn session(&self) -> Arc<InferenceSession>
Shared handle to the engine session. Useful in tests that want to publish to a topic or read a mutable table while the server is running.
Sourcepub fn with_readiness(self, readiness: Arc<ReadinessProbe>) -> Self
pub fn with_readiness(self, readiness: Arc<ReadinessProbe>) -> Self
Override the readiness probe. Used by integration tests to make
/readyz deterministically return 503.
Sourcepub async fn bind(self) -> Result<BoundServer, ServerError>
pub async fn bind(self) -> Result<BoundServer, ServerError>
Bind both listeners eagerly and return a BoundServer holding them
live. The gRPC + Flight SQL surface and the HTTP side-channel are each
bound here — so their ACTUAL addresses are known (the real ports even
when the config requested an ephemeral :0) before a single connection
is served, and neither port is released before
BoundServer::serve_with_shutdown serves on the same listeners. A
caller reads the resolved ports off the returned handle
(BoundServer::flight_addr / BoundServer::health_addr) while the
listeners stay bound, with no observable release-then-rebind window.
Sourcepub async fn run(self) -> Result<(), ServerError>
pub async fn run(self) -> Result<(), ServerError>
Drive the server until SIGINT / SIGTERM arrives. Both the HTTP side-channel and the gRPC surface drain in parallel; the call returns when both have stopped accepting new connections and finished serving in-flight requests.
Sourcepub async fn run_with_shutdown(
self,
shutdown: impl Future<Output = ()> + Send + 'static,
) -> Result<(), ServerError>
pub async fn run_with_shutdown( self, shutdown: impl Future<Output = ()> + Send + 'static, ) -> Result<(), ServerError>
Variant of Self::run that accepts a caller-provided
shutdown future. Tests use this to drive deterministic
teardown.
Auto Trait Implementations§
impl !RefUnwindSafe for OssServer
impl !UnwindSafe for OssServer
impl Freeze for OssServer
impl Send for OssServer
impl Sync for OssServer
impl Unpin for OssServer
impl UnsafeUnpin for OssServer
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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>
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 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>
T in a tonic::RequestSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.