ExternalIntegration

Trait ExternalIntegration 

Source
pub trait ExternalIntegration: Debug {
    // Required methods
    fn initialize(&mut self, config: &IntegrationConfig) -> SklResult<()>;
    fn health_check(&self) -> SklResult<HealthStatus>;
    fn send_data(
        &self,
        data: &IntegrationData,
    ) -> SklResult<IntegrationResponse>;
    fn receive_data(
        &self,
        request: &IntegrationRequest,
    ) -> SklResult<IntegrationData>;
    fn execute_operation(
        &self,
        operation: &Operation,
    ) -> SklResult<OperationResult>;
    fn cleanup(&mut self) -> SklResult<()>;
}
Expand description

External integration trait that all integrations must implement

Required Methods§

Source

fn initialize(&mut self, config: &IntegrationConfig) -> SklResult<()>

Initialize the integration

Source

fn health_check(&self) -> SklResult<HealthStatus>

Check if the integration is healthy

Source

fn send_data(&self, data: &IntegrationData) -> SklResult<IntegrationResponse>

Send data to the external service

Source

fn receive_data( &self, request: &IntegrationRequest, ) -> SklResult<IntegrationData>

Receive data from the external service

Source

fn execute_operation(&self, operation: &Operation) -> SklResult<OperationResult>

Execute a custom operation

Source

fn cleanup(&mut self) -> SklResult<()>

Clean up resources

Implementors§