Temporal SDK
Temporal workflows + Meridian
Durable execution for Meridian scans. Define workflows that survive crashes, retry activities automatically, and maintain state across long-running integrity checks — all backed by Temporal's event-sourced architecture.
How it fits
Workflow
Orchestrates the full scan lifecycle — start, retry, timeout, complete.
Activity
Calls Meridian API to perform the actual integrity check.
Signal
External triggers (webhook, dashboard) can cancel or query mid-flight.
Activity — API call inside Temporal
import { Context } from '@temporalio/activity';
export async function meridianScanActivity(
target: string
): Promise<ScanResult> {
const apiKey = await Context.current().secrets.get('MERIDIAN_API_KEY');
const response = await fetch('https://api.getnimbus.net/v1/scan', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ target, mode: 'integrity' }),
});
if (!response.ok) {
throw new Error(`Scan failed: ${response.status}`);
}
return response.json();
}