pub struct TailtriageControllerBuilder { /* private fields */ }Expand description
Builder for a long-lived TailtriageController.
Implementations§
Source§impl TailtriageControllerBuilder
impl TailtriageControllerBuilder
Sourcepub fn new(service_name: impl Into<String>) -> Self
pub fn new(service_name: impl Into<String>) -> Self
Creates a controller builder for one service.
Sourcepub fn config_path(self, config_path: impl AsRef<Path>) -> Self
pub fn config_path(self, config_path: impl AsRef<Path>) -> Self
Sets the optional config path used for reloadable controller config.
Sourcepub const fn initially_enabled(self, initially_enabled: bool) -> Self
pub const fn initially_enabled(self, initially_enabled: bool) -> Self
Sets whether build should immediately create the first active generation.
When set to true, Self::build calls TailtriageController::enable
during construction so generation 1 is active as soon as build succeeds.
Sourcepub fn output(self, output_path: impl AsRef<Path>) -> Self
pub fn output(self, output_path: impl AsRef<Path>) -> Self
Sets the output location template for future activation runs.
Sourcepub const fn capture_limits_override(
self,
capture_limits_override: CaptureLimitsOverride,
) -> Self
pub const fn capture_limits_override( self, capture_limits_override: CaptureLimitsOverride, ) -> Self
Sets field-level capture limit overrides applied on top of selected mode defaults.
Sourcepub const fn strict_lifecycle(self, strict_lifecycle: bool) -> Self
pub const fn strict_lifecycle(self, strict_lifecycle: bool) -> Self
Sets strict lifecycle validation applied to future activation runs.
Sourcepub const fn runtime_sampler(
self,
runtime_sampler: RuntimeSamplerTemplate,
) -> Self
pub const fn runtime_sampler( self, runtime_sampler: RuntimeSamplerTemplate, ) -> Self
Sets runtime sampler template settings for future activations.
Sourcepub const fn run_end_policy(self, run_end_policy: RunEndPolicy) -> Self
pub const fn run_end_policy(self, run_end_policy: RunEndPolicy) -> Self
Sets a run-end policy template applied to future activations.
Sourcepub fn build(self) -> Result<TailtriageController, ControllerBuildError>
pub fn build(self) -> Result<TailtriageController, ControllerBuildError>
Builds the controller.
§Errors
When config_path(...) is set, controller.service_name from TOML takes
precedence when present; the builder value is used only when TOML omits it.
Returns ControllerBuildError::EmptyServiceName when the final resolved
service_name is blank.
Returns ControllerBuildError::ConfigLoad when config_path(...) is set and
reading or parsing the TOML file fails.
Returns ControllerBuildError::InitialEnable when
Self::initially_enabled is true and the first generation cannot be
armed.
Trait Implementations§
Source§impl Clone for TailtriageControllerBuilder
impl Clone for TailtriageControllerBuilder
Source§fn clone(&self) -> TailtriageControllerBuilder
fn clone(&self) -> TailtriageControllerBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more