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.
Click to show internal directories.
Click to hide internal directories.