Documentation
¶
Overview ¶
Example: etcd provider
Prerequisites:
- Start etcd: docker run -d --name etcd -p 2379:2379 quay.io/coreos/etcd:v3.5.0 etcd --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379
- Seed keys: etcdctl put myapp/db/host localhost etcdctl put myapp/db/port 5432 etcdctl put myapp/verbose true etcdctl put myapp/timeout 30s
- Run: go run examples/etcd/main.go
- In another terminal, change a value: etcdctl put myapp/db/port 3306 Watch the output — the update is reflected within seconds.
Click to show internal directories.
Click to hide internal directories.