payment-timeout

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Command payment-timeout shows Select: waiting for whichever of several things happens first — here, a payment signal OR a timeout.

DATABASE_URL=postgres://localhost:5432/river_dev?sslmode=disable \
    go run ./examples/payment-timeout

The "checkout" workflow reserves stock, then waits for a "paid" signal. If it arrives in time it ships; if the deadline passes first it releases the stock and expires. Select records which branch it took, so this stays correct across restarts. This program runs it twice: once paying in time, once letting it expire.

Jump to

Keyboard shortcuts

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