orders

command
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Command orders is the phase 6 example: one HTTP route creates an order through the command bus, the order service emits an event, a listener puts a confirmation email on the queue, and a scheduled job reports the count. GET /orders/{id} goes through the query bus and the response cache. The same handlers answer microservice messages (orders.get) over an in-process transport; swap in micro/nats to serve them over NATS.

go run ./examples/orders
curl -X POST localhost:9900/orders -d '{"item":"pen","qty":2}'
curl localhost:9900/orders/1

Jump to

Keyboard shortcuts

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