etcd

command
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Example: etcd provider

Prerequisites:

  1. 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
  2. Seed keys: etcdctl put myapp/db/host localhost etcdctl put myapp/db/port 5432 etcdctl put myapp/verbose true etcdctl put myapp/timeout 30s
  3. Run: go run examples/etcd/main.go
  4. In another terminal, change a value: etcdctl put myapp/db/port 3306 Watch the output — the update is reflected within seconds.

Jump to

Keyboard shortcuts

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