pub struct ScriptNotifier { /* private fields */ }
Expand description
A notification handler that executes scripts when triggered
This notifier takes a script configuration and executes the specified script when a monitor match occurs. It supports different script languages and allows passing arguments and setting timeouts for script execution.
Implementations§
Source§impl ScriptNotifier
impl ScriptNotifier
Sourcepub fn from_config(config: &TriggerTypeConfig) -> Option<Self>
pub fn from_config(config: &TriggerTypeConfig) -> Option<Self>
Creates a Script notifier from a trigger configuration
Trait Implementations§
Source§impl ScriptExecutor for ScriptNotifier
impl ScriptExecutor for ScriptNotifier
Source§fn script_notify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
monitor_match: &'life1 MonitorMatch,
script_content: &'life2 (ScriptLanguage, String),
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn script_notify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
monitor_match: &'life1 MonitorMatch,
script_content: &'life2 (ScriptLanguage, String),
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Implement the actual script notification logic
Auto Trait Implementations§
impl Freeze for ScriptNotifier
impl RefUnwindSafe for ScriptNotifier
impl Send for ScriptNotifier
impl Sync for ScriptNotifier
impl Unpin for ScriptNotifier
impl UnwindSafe for ScriptNotifier
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> Chain<T> for T
impl<T> Chain<T> for T
§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> 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 more