pub trait GridParticipationPort: Send + Sync {
// Required methods
fn check_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoincConsent>, GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn grant_consent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner_id: Uuid,
organization_id: Uuid,
consent_version: &'life1 str,
consent_ip: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<BoincConsent, GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn revoke_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_task<'life0, 'async_trait>(
&'life0 self,
task: GridTask,
) -> Pin<Box<dyn Future<Output = Result<GridTaskId, GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn poll_result<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<GridTaskStatus, GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cancel_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Port pour la participation au calcul distribué BOINC.
Gère consentement GDPR + soumission/poll de tâches.
L’adapter BoincGridAdapter dans infrastructure/grid/ implémente ce trait.
GDPR: le consentement est explicite (Art. 6.1.a), révocable à tout moment (Art. 7.3). K-anonymité: minimum 5 participants pour toute tâche de groupe.
Required Methods§
Sourcefn check_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vérifie si le propriétaire a consenti à la participation BOINC.
Sourcefn get_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoincConsent>, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoincConsent>, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Récupère les détails du consentement (pour affichage RGPD).
Sourcefn grant_consent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner_id: Uuid,
organization_id: Uuid,
consent_version: &'life1 str,
consent_ip: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<BoincConsent, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn grant_consent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner_id: Uuid,
organization_id: Uuid,
consent_version: &'life1 str,
consent_ip: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<BoincConsent, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Enregistre le consentement explicite (GDPR Article 7).
Sourcefn revoke_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn revoke_consent<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Révoque le consentement (GDPR Article 7.3 - droit de retrait immédiat).
Sourcefn submit_task<'life0, 'async_trait>(
&'life0 self,
task: GridTask,
) -> Pin<Box<dyn Future<Output = Result<GridTaskId, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_task<'life0, 'async_trait>(
&'life0 self,
task: GridTask,
) -> Pin<Box<dyn Future<Output = Result<GridTaskId, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Soumet une tâche de calcul au cluster BOINC. Pré-condition: check_consent() doit être true (vérifié par le use case).
Sourcefn poll_result<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<GridTaskStatus, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll_result<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<GridTaskStatus, GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Interroge le statut d’une tâche (polling).
Sourcefn cancel_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 GridTaskId,
) -> Pin<Box<dyn Future<Output = Result<(), GridError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Annule une tâche en cours.