Documentation
¶
Overview ¶
Package clientid stores a random identifier for a local CLI installation.
Index ¶
Constants ¶
const HeaderName = "X-Client-Id"
HeaderName identifies a local CLI installation in outgoing HTTP requests.
Variables ¶
This section is empty.
Functions ¶
func LoadOrCreate ¶
LoadOrCreate returns the UUIDv4 stored in directory/client_id. The ID is independent of credentials, profiles, and CLI versions. It is never silently replaced: an unreadable or invalid existing file is an error.
A fully written temporary file is published with an atomic, non-replacing hard link. Concurrent first callers, including separate processes, all use the winning file; no caller can observe a partially written ID. The directory must support hard links when creating an ID for the first time.
Types ¶
This section is empty.