examples/

directory
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0

README

Examples

Each folder is a whole project: a rig.yaml and the code it runs. Start with hello.

example runs on what it shows
hello local processes the smallest rig.yaml: one Go service, logs, metrics without Prometheus, a load generator, a test suite; opens in the simple view
shop docker (or local + docker infra) an api and a worker over Postgres, Redis, RabbitMQ and Zipkin; compose.yaml is the same stack, and what rig init started from. Every screen has something real: orders in the database, the queue and its failures, one trace from api to worker, saved queries, alerts
python local processes a Python service (stdlib only): no build step, JSON logs, /metrics read by rig, load, unittest
kind kind, docker, local Kubernetes: manifests in deploy/, an HPA, pprof, load from rig
cd examples/hello
rig up        # build and start
rig           # the control plane (V switches simple / detailed view, ? lists the keys)
rig down

examples/internal/demo is what the services share (JSON logs, metrics, spans), so each main.go is only about its own work.

Directories

Path Synopsis
Command hello is the smallest rig example: one HTTP service with JSON logs and Prometheus metrics.
Command hello is the smallest rig example: one HTTP service with JSON logs and Prometheus metrics.
internal
demo
Package demo is what the example services share: JSON logs, Prometheus metrics, Zipkin spans and pprof, with the standard library only, so each example's main.go is about its own work.
Package demo is what the example services share: JSON logs, Prometheus metrics, Zipkin spans and pprof, with the standard library only, so each example's main.go is about its own work.
kind
app command
Command app is the kind example's workload: one binary, two roles chosen by ROLE.
Command app is the kind example's workload: one binary, two roles chosen by ROLE.
shop
app command
Command app is the shop example's workload: one binary, two roles chosen by ROLE.
Command app is the shop example's workload: one binary, two roles chosen by ROLE.

Jump to

Keyboard shortcuts

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