saga

command
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package main demonstrates the Saga pattern with compensation.

This example shows: - Multiple activities with compensation functions - Automatic compensation on failure (LIFO order) - Transaction-like behavior without distributed transactions

The workflow simulates a trip booking: 1. Book flight 2. Reserve hotel 3. Rent car 4. Process payment (fails to trigger compensations)

Usage:

go run ./examples/saga/

Jump to

Keyboard shortcuts

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