Extend error handling in FluencePeer (#98)

This commit is contained in:
Pavel
2021-11-09 14:37:44 +03:00
committed by GitHub
parent 337a3f45de
commit aa21abe465
12 changed files with 214 additions and 103 deletions

View File

@ -140,6 +140,19 @@ export class Particle {
}
}
export type ParticleExecutionStage =
| { stage: 'received' }
| { stage: 'interpreted' }
| { stage: 'interpreterError'; errorMessage: string }
| { stage: 'localWorkDone' }
| { stage: 'sent' }
| { stage: 'expired' };
export interface ParticleQueueItem {
particle: Particle;
onStageChange: (state: ParticleExecutionStage) => void;
}
function genUUID() {
return uuidv4();
}