resume

command
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

Resume Example — Crash Recovery

The core durable-go demo. Shows that completed steps are never re-executed after a crash.

Run

# Run 1 — crashes intentionally after step 2
CRASH_AFTER=2 go run .

# Run 2 — resumes; steps 1 & 2 replayed from cache, only step 3 executes
go run .

Expected output

Run 1

  → [fetch-data]       querying database …  ✓
  → [run-computation]  running model …      ✓
💥  SIMULATED CRASH after step 2

Run 2

  → [deliver-report]   sending report …     ✓
✅  Report delivered: true

On run 2, fetch-data and run-computation return from the journal without calling the step functions.

Reset

rm -rf examples/resume/.data/

Documentation

Overview

Package main demonstrates durable-go's core value: crash recovery and step replay.

How to run this demo

  1. First run – crashes intentionally after step 2: CRASH_AFTER=2 go run .

  2. Second run – resumes from step 3 (steps 1 & 2 are replayed from cache): go run .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL