clientid

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package clientid stores a random identifier for a local CLI installation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadOrCreate

func LoadOrCreate(directory string) (string, error)

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.

Jump to

Keyboard shortcuts

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