MCPcopy
hub / github.com/cortexlabs/cortex / clientID

Function clientID

cli/cmd/lib_client_id.go:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24var _cachedClientID string
25
26func clientID() string {
27 if _cachedClientID != "" {
28 return _cachedClientID
29 }
30
31 var err error
32 _cachedClientID, err = files.ReadFile(_clientIDPath)
33 if err != nil || _cachedClientID == "" {
34 _cachedClientID = uuid.New().String()
35 files.WriteFile([]byte(_cachedClientID), _clientIDPath)
36 }
37
38 return _cachedClientID
39}

Callers 4

MustGetOperatorConfigFunction · 0.85
initTelemetryFunction · 0.85
cluster.goFile · 0.85
getInfoOperatorResponseFunction · 0.85

Calls 3

ReadFileFunction · 0.92
WriteFileFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected