Documentation
¶
Overview ¶
Package socketpath resolves the unix-socket path that the daemon and its CLI clients agree on. Resolution order: explicit flag, AMBER_STORE_SOCKET env, then a platform default — $XDG_RUNTIME_DIR/amber-store.sock when XDG_RUNTIME_DIR is set and absolute (typical on Linux), otherwise /tmp/amber-store-<uid>.sock.
The fallback deliberately ignores TMPDIR: environments like nix-shell and direnv set a fresh per-shell TMPDIR, so a TMPDIR-derived default would make a daemon and a client started in different shells resolve different "default" paths and never rendezvous. /tmp is stable for every process of a user; the per-uid suffix keeps it from colliding across users, and the socket's file mode (no write permission for group/other) keeps other users from connecting.
Index ¶
Constants ¶
const EnvVar = "AMBER_STORE_SOCKET"
EnvVar is the environment variable that overrides the default socket path.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.