pub struct RunnerConfigBuilder<A, G, S> { /* private fields */ }Available on crate feature
runner only.Expand description
A typestate builder for constructing a Runner.
The three type parameters track whether the required fields have been
provided. build() is only available when all three are Has*.
Implementations§
Source§impl RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
impl RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
Sourcepub fn new() -> RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
pub fn new() -> RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
Create a new builder with all fields unset and defaults applied.
Source§impl<A, G, S> RunnerConfigBuilder<A, G, S>
impl<A, G, S> RunnerConfigBuilder<A, G, S>
Sourcepub fn app_name(
self,
name: impl Into<String>,
) -> RunnerConfigBuilder<HasAppName, G, S>
pub fn app_name( self, name: impl Into<String>, ) -> RunnerConfigBuilder<HasAppName, G, S>
Set the application name (required).
Sourcepub fn agent(self, agent: Arc<dyn Agent>) -> RunnerConfigBuilder<A, HasAgent, S>
pub fn agent(self, agent: Arc<dyn Agent>) -> RunnerConfigBuilder<A, HasAgent, S>
Set the root agent (required).
Sourcepub fn session_service(
self,
service: Arc<dyn SessionService>,
) -> RunnerConfigBuilder<A, G, HasSessionService>
pub fn session_service( self, service: Arc<dyn SessionService>, ) -> RunnerConfigBuilder<A, G, HasSessionService>
Set the session service (required).
Source§impl<A, G, S> RunnerConfigBuilder<A, G, S>
impl<A, G, S> RunnerConfigBuilder<A, G, S>
Sourcepub fn artifact_service(
self,
service: Arc<dyn ArtifactService>,
) -> RunnerConfigBuilder<A, G, S>
pub fn artifact_service( self, service: Arc<dyn ArtifactService>, ) -> RunnerConfigBuilder<A, G, S>
Set the artifact service (optional).
Sourcepub fn memory_service(
self,
service: Arc<dyn Memory>,
) -> RunnerConfigBuilder<A, G, S>
pub fn memory_service( self, service: Arc<dyn Memory>, ) -> RunnerConfigBuilder<A, G, S>
Set the memory service (optional).
Sourcepub fn plugin_manager(
self,
manager: Arc<PluginManager>,
) -> RunnerConfigBuilder<A, G, S>
pub fn plugin_manager( self, manager: Arc<PluginManager>, ) -> RunnerConfigBuilder<A, G, S>
Set the plugin manager (optional).
Sourcepub fn run_config(self, config: RunConfig) -> RunnerConfigBuilder<A, G, S>
pub fn run_config(self, config: RunConfig) -> RunnerConfigBuilder<A, G, S>
Set the run configuration (optional).
Sourcepub fn compaction_config(
self,
config: EventsCompactionConfig,
) -> RunnerConfigBuilder<A, G, S>
pub fn compaction_config( self, config: EventsCompactionConfig, ) -> RunnerConfigBuilder<A, G, S>
Set the events compaction configuration (optional).
Sourcepub fn context_cache_config(
self,
config: ContextCacheConfig,
) -> RunnerConfigBuilder<A, G, S>
pub fn context_cache_config( self, config: ContextCacheConfig, ) -> RunnerConfigBuilder<A, G, S>
Set the context cache configuration (optional).
Sourcepub fn cache_capable(
self,
model: Arc<dyn CacheCapable>,
) -> RunnerConfigBuilder<A, G, S>
pub fn cache_capable( self, model: Arc<dyn CacheCapable>, ) -> RunnerConfigBuilder<A, G, S>
Set the cache-capable model reference (optional).
Sourcepub fn request_context(
self,
ctx: RequestContext,
) -> RunnerConfigBuilder<A, G, S>
pub fn request_context( self, ctx: RequestContext, ) -> RunnerConfigBuilder<A, G, S>
Set the request context from auth middleware (optional).
Sourcepub fn cancellation_token(
self,
token: CancellationToken,
) -> RunnerConfigBuilder<A, G, S>
pub fn cancellation_token( self, token: CancellationToken, ) -> RunnerConfigBuilder<A, G, S>
Set a cooperative cancellation token (optional).
Trait Implementations§
Source§impl Default for RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
impl Default for RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
Source§fn default() -> RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
fn default() -> RunnerConfigBuilder<NoAppName, NoAgent, NoSessionService>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<A, G, S> Freeze for RunnerConfigBuilder<A, G, S>
impl<A, G, S> !RefUnwindSafe for RunnerConfigBuilder<A, G, S>
impl<A, G, S> Send for RunnerConfigBuilder<A, G, S>
impl<A, G, S> Sync for RunnerConfigBuilder<A, G, S>
impl<A, G, S> Unpin for RunnerConfigBuilder<A, G, S>
impl<A, G, S> UnsafeUnpin for RunnerConfigBuilder<A, G, S>
impl<A, G, S> !UnwindSafe for RunnerConfigBuilder<A, G, S>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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::RequestCreates a shared type from an unshared type.