pub struct SystemOneService {
pub state: AppState,
pub auth: AuthConfig,
pub limits: RequestLimits,
}Expand description
gRPC service implementation of the openkind.SystemOne service contract.
Fields§
§state: AppStateShared application state containing the model registry.
auth: AuthConfigAuthentication configuration.
limits: RequestLimitsTransport budgets, optionally shared with the HTTP listener.
Implementations§
Source§impl SystemOneService
impl SystemOneService
Sourcepub fn new(registry: EngineRegistry) -> Self
pub fn new(registry: EngineRegistry) -> Self
Construct a new SystemOneService backed by the specified engine registry and default auth.
Sourcepub fn with_auth(registry: EngineRegistry, auth: AuthConfig) -> Self
pub fn with_auth(registry: EngineRegistry, auth: AuthConfig) -> Self
Construct a new SystemOneService backed by the specified engine registry and auth configuration.
Sourcepub fn with_auth_and_limits(
registry: EngineRegistry,
auth: AuthConfig,
limits: RequestLimits,
) -> Self
pub fn with_auth_and_limits( registry: EngineRegistry, auth: AuthConfig, limits: RequestLimits, ) -> Self
Construct the service with explicit, potentially shared transport budgets.
Trait Implementations§
Source§impl SystemOne for SystemOneService
impl SystemOne for SystemOneService
Source§fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: Request<SystemOneRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemOneResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evaluate<'life0, 'async_trait>(
&'life0 self,
request: Request<SystemOneRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemOneResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Evaluates a decision-making / System 1 request against a registered model backend. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SystemOneService
impl !UnwindSafe for SystemOneService
impl Freeze for SystemOneService
impl Send for SystemOneService
impl Sync for SystemOneService
impl Unpin for SystemOneService
impl UnsafeUnpin for SystemOneService
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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