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§
Sourcefn initialize(&mut self, config: &IntegrationConfig) -> SklResult<()>
fn initialize(&mut self, config: &IntegrationConfig) -> SklResult<()>
Initialize the integration
Sourcefn health_check(&self) -> SklResult<HealthStatus>
fn health_check(&self) -> SklResult<HealthStatus>
Check if the integration is healthy
Sourcefn send_data(&self, data: &IntegrationData) -> SklResult<IntegrationResponse>
fn send_data(&self, data: &IntegrationData) -> SklResult<IntegrationResponse>
Send data to the external service
Sourcefn receive_data(
&self,
request: &IntegrationRequest,
) -> SklResult<IntegrationData>
fn receive_data( &self, request: &IntegrationRequest, ) -> SklResult<IntegrationData>
Receive data from the external service
Sourcefn execute_operation(&self, operation: &Operation) -> SklResult<OperationResult>
fn execute_operation(&self, operation: &Operation) -> SklResult<OperationResult>
Execute a custom operation