Skip to main content

TailtriageControllerBuilder

Struct TailtriageControllerBuilder 

Source
pub struct TailtriageControllerBuilder { /* private fields */ }
Expand description

Builder for a long-lived TailtriageController.

Implementations§

Source§

impl TailtriageControllerBuilder

Source

pub fn new(service_name: impl Into<String>) -> Self

Creates a controller builder for one service.

Source

pub fn config_path(self, config_path: impl AsRef<Path>) -> Self

Sets the optional config path used for reloadable controller config.

Source

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.

Source

pub fn output(self, output_path: impl AsRef<Path>) -> Self

Sets the output location template for future activation runs.

Source

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.

Source

pub const fn strict_lifecycle(self, strict_lifecycle: bool) -> Self

Sets strict lifecycle validation applied to future activation runs.

Source

pub const fn runtime_sampler( self, runtime_sampler: RuntimeSamplerTemplate, ) -> Self

Sets runtime sampler template settings for future activations.

Source

pub const fn run_end_policy(self, run_end_policy: RunEndPolicy) -> Self

Sets a run-end policy template applied to future activations.

Source

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

Source§

fn clone(&self) -> TailtriageControllerBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TailtriageControllerBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.