Skip to content

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 cluster

Same 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.

LanguageInstallStart here
Gogo get github.com/odurgut/clusdr/sdkGo SDK
Pythonpip install clusdrPython SDK

CPython 3.10+. Wire package clusdr.v1alpha1.

What both SDKs do

  • Local / local() — apps. Address: CLUSDR_GRPC_ADDR or 127.0.0.1:7947
  • Dial / 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 / ResourceExhausted with 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 --topic exists; 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

VariableWho reads itMeaning
CLUSDR_GRPC_ADDRBothRuntime address. Default 127.0.0.1:7947
CLUSDR_TLSBothdisabled / off / false / 0 → plaintext
CLUSDR_DATA_DIRBothDirectory with PEMs. Else ~/.clusdr
CLUSDR_TLS_SERVER_NAMEPython onlyTLS 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=.

Documentation is sourced from the clusdr/docs tree.