SECTOR 03 // BUILT-IN PROVIDERS
Built-in providers
Eleven providers compile into the binary (zero install). They split by
injection mechanism: process control (docker), a proxy in the request
path (toxiproxy), the DNS resolver (net), plus eight primitives (http,
tcp, grpc, sql, redis, prom, load, exec). Two more composed
providers ship as examples on top of
Pumba.
Named instances #
The configured name is the namespace. Configure one type twice to address two deployments:
providers:
appA:
use: ./providers/app
config:
apiBase: http://a:8080
appB:
use: ./providers/app
config:
apiBase: http://b:8080
…then appA.submit, appB.submit. Native types use source: the same way.
docker
Lifecycle (up/down) plus process, network, and resource faults (kill, pause, restart, disconnect, throttle) over the docker compose CLI.
toxiproxy
Proxy-in-path network faults: latency, packet loss, bandwidth, blackhole, timeout, and partition, each scoped to a stream direction.
net
DNS-level faults via dnsmasq: redirect, NXDOMAIN, or blackhole a hostname, and restore it after.
http
Request and capture over HTTP, with structured JSON responses and status assertions.
tcp
A connect/reachability probe: is the port up, and how long does connecting take?
sql
Run real SQL against the system and capture structured rows, over database/sql.
redis
Drive and observe a Redis cache: probes to assert on, actions to drive workload, over go-redis.
grpc
A standard gRPC health-check probe over the grpc.health.v1 protocol.
prom
Scrape a Prometheus/OpenMetrics endpoint or run a PromQL instant query for SLO assertions.
load
Generate controlled HTTP workload and assert on its degradation percentiles under fault.
exec
The escape hatch: run an arbitrary shell command from the project root.
netem & resource
Composed Pumba providers for kernel-level network faults and resource exhaustion.