pub struct Loki {}Expand description
A factory for creating Grafana Loki loggers using a fluent builder pattern.
This factory provides two paths for construction:
- Standard: Uses the default network-based Loki service.
- Injected: Allows providing a custom implementation of the
Lokitrait.
Implementations§
Source§impl Loki
impl Loki
Sourcepub fn config(self, config: LokiConfig) -> LokiConfig
pub fn config(self, config: LokiConfig) -> LokiConfig
Begins the building process by providing a LokiConfig.
Sourcepub fn service(
self,
config: LokiConfig,
service: Box<dyn Loki + Send + Sync>,
) -> LokiFactoryService
pub fn service( self, config: LokiConfig, service: Box<dyn Loki + Send + Sync>, ) -> LokiFactoryService
Shortcut to create a factory state with a pre-defined configuration and service.
Auto Trait Implementations§
impl Freeze for Loki
impl RefUnwindSafe for Loki
impl Send for Loki
impl Sync for Loki
impl Unpin for Loki
impl UnwindSafe for Loki
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.