#[repr(C)]pub struct OutputSinkVTable {
pub init: Option<unsafe extern "C" fn(*const u8, usize) -> *mut c_void>,
pub get_handled_tags: Option<unsafe extern "C" fn(*mut c_void, *mut *mut u8, *mut usize)>,
pub send: Option<unsafe extern "C" fn(*mut c_void, *const u8, usize) -> i32>,
pub flush: Option<unsafe extern "C" fn(*mut c_void) -> i32>,
pub free_buffer: Option<unsafe extern "C" fn(*mut u8, usize)>,
pub drop: Option<unsafe extern "C" fn(*mut c_void)>,
}Expand description
Function pointer types for output sink plugins (alerts, webhooks, etc.)
Fields§
§init: Option<unsafe extern "C" fn(*const u8, usize) -> *mut c_void>Initialize the output sink with configuration.
config: MessagePack-encoded configuration object
Returns: opaque instance pointer, or null on error
Get the tags this sink handles (for routing). Returns a MessagePack-encoded array of strings. Empty array means sink handles all alerts.
send: Option<unsafe extern "C" fn(*mut c_void, *const u8, usize) -> i32>Send an alert.
alert: MessagePack-encoded Alert struct
Returns: 0 on success, non-zero error code on failure
flush: Option<unsafe extern "C" fn(*mut c_void) -> i32>Flush any pending alerts. Returns: 0 on success, non-zero error code on failure
free_buffer: Option<unsafe extern "C" fn(*mut u8, usize)>Free a buffer allocated by get_handled_tags.
drop: Option<unsafe extern "C" fn(*mut c_void)>Cleanup and destroy the instance.
Auto Trait Implementations§
impl Freeze for OutputSinkVTable
impl RefUnwindSafe for OutputSinkVTable
impl Send for OutputSinkVTable
impl Sync for OutputSinkVTable
impl Unpin for OutputSinkVTable
impl UnsafeUnpin for OutputSinkVTable
impl UnwindSafe for OutputSinkVTable
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
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