pub struct SemanticIncidentManager { /* private fields */ }Expand description
Semantic incident manager
Implementations§
Source§impl SemanticIncidentManager
impl SemanticIncidentManager
Sourcepub fn new_with_webhooks(webhook_configs: Vec<WebhookConfig>) -> Self
pub fn new_with_webhooks(webhook_configs: Vec<WebhookConfig>) -> Self
Create a new semantic incident manager with webhooks
Sourcepub fn add_webhook(&mut self, config: WebhookConfig)
pub fn add_webhook(&mut self, config: WebhookConfig)
Add webhook configuration
Sourcepub async fn create_incident(
&self,
result: &SemanticDriftResult,
endpoint: String,
method: String,
workspace_id: Option<String>,
related_drift_incident_id: Option<String>,
contract_diff_id: Option<String>,
) -> SemanticIncident
pub async fn create_incident( &self, result: &SemanticDriftResult, endpoint: String, method: String, workspace_id: Option<String>, related_drift_incident_id: Option<String>, contract_diff_id: Option<String>, ) -> SemanticIncident
Create a semantic incident from a drift result
Sourcepub async fn get_incident(&self, id: &str) -> Option<SemanticIncident>
pub async fn get_incident(&self, id: &str) -> Option<SemanticIncident>
Get an incident by ID
Sourcepub async fn update_incident(&self, incident: SemanticIncident)
pub async fn update_incident(&self, incident: SemanticIncident)
Update an incident
Sourcepub async fn list_incidents(
&self,
workspace_id: Option<&str>,
endpoint: Option<&str>,
method: Option<&str>,
status: Option<IncidentStatus>,
limit: Option<usize>,
) -> Vec<SemanticIncident>
pub async fn list_incidents( &self, workspace_id: Option<&str>, endpoint: Option<&str>, method: Option<&str>, status: Option<IncidentStatus>, limit: Option<usize>, ) -> Vec<SemanticIncident>
List incidents with optional filters
Sourcepub async fn acknowledge_incident(&self, id: &str) -> Option<SemanticIncident>
pub async fn acknowledge_incident(&self, id: &str) -> Option<SemanticIncident>
Acknowledge an incident
Sourcepub async fn resolve_incident(&self, id: &str) -> Option<SemanticIncident>
pub async fn resolve_incident(&self, id: &str) -> Option<SemanticIncident>
Resolve an incident
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SemanticIncidentManager
impl !RefUnwindSafe for SemanticIncidentManager
impl Send for SemanticIncidentManager
impl Sync for SemanticIncidentManager
impl Unpin for SemanticIncidentManager
impl !UnwindSafe for SemanticIncidentManager
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