SDKs
The application talks to the local daemon. The daemon is the cluster member. The SDK does not join Raft and does not dial other nodes.
text
your process ──► clusdr on this host ──► the rest of the clusterSame split as a local Docker engine. Two apps on one machine share one daemon.
The guide is the first call. These pages are the SDK.
| Language | Install | Start here |
|---|---|---|
| Go | go get github.com/odurgut/clusdr/sdk | Go SDK |
| Python | pip install clusdr | Python SDK |
CPython 3.10+. Wire package clusdr.v1alpha1.
What both SDKs do
Local/local()— apps. Address:CLUSDR_GRPC_ADDRor127.0.0.1:7947Dial/dial(addr)— tests and operators, not the default app path- Membership, leader, Watch, Publish
- Locks and leases with a fencing token and background renew
- Retry
Unavailable/Aborted/ResourceExhaustedwith bounded backoff - Watch reconnects with
last_seq - On connect, wait for the Health RPC (default 10s) or fail
TLS is on unless CLUSDR_TLS=disabled. Certs: ca.crt, node.crt, node.key in CLUSDR_DATA_DIR or ~/.clusdr.
What they do not do
- Join, promote, or configure the cluster (CLI)
- Filter Watch by topic (CLI
--topicexists; the SDK stream is the full bus) - Store application data
- Talk to a remote node's Runtime API as the normal path — put a daemon on that host
Environment
| Variable | Who reads it | Meaning |
|---|---|---|
CLUSDR_GRPC_ADDR | Both | Runtime address. Default 127.0.0.1:7947 |
CLUSDR_TLS | Both | disabled / off / false / 0 → plaintext |
CLUSDR_DATA_DIR | Both | Directory with PEMs. Else ~/.clusdr |
CLUSDR_TLS_SERVER_NAME | Python only | TLS server name override (peer node id) |
Holder
Each connection has a lock/lease identity. Empty → generated sdk-<hex>. Two apps on the same host cannot unlock each other unless they share WithHolder / holder=.