Struct LoggerPluginWrapper

Source
pub struct LoggerPluginWrapper<L: LoggerPlugin> { /* private fields */ }
Expand description

Wrapper that adapts a LoggerPlugin to the OsqueryPlugin interface.

This wrapper handles the complexity of osquery’s logger protocol, parsing different request formats and calling the appropriate methods on your LoggerPlugin implementation.

You typically don’t need to interact with this directly - use Plugin::logger() to create plugins.

Implementations§

Source§

impl<L: LoggerPlugin> LoggerPluginWrapper<L>

Source

pub fn new(logger: L) -> Self

Trait Implementations§

Source§

impl<L: LoggerPlugin> OsqueryPlugin for LoggerPluginWrapper<L>

Source§

fn name(&self) -> String

Source§

fn registry(&self) -> Registry

Source§

fn routes(&self) -> Vec<BTreeMap<String, String>>

Source§

fn ping(&self) -> ExtensionStatus

Source§

fn handle_call(&self, request: BTreeMap<String, String>) -> ExtensionResponse

Source§

fn shutdown(&self)

Auto Trait Implementations§

§

impl<L> Freeze for LoggerPluginWrapper<L>
where L: Freeze,

§

impl<L> RefUnwindSafe for LoggerPluginWrapper<L>
where L: RefUnwindSafe,

§

impl<L> Send for LoggerPluginWrapper<L>

§

impl<L> Sync for LoggerPluginWrapper<L>

§

impl<L> Unpin for LoggerPluginWrapper<L>
where L: Unpin,

§

impl<L> UnwindSafe for LoggerPluginWrapper<L>
where L: UnwindSafe,

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> 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, 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.