MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / GetKeyFile

Function GetKeyFile

utils/keys.go:12–18  ·  view source on GitHub ↗

GetKeyFile returns the path to the SSH key file for a given instance UUID. Falls back to empty string only if ThunderDir resolution fails, which callers should treat as "no cached key".

(uuid string)

Source from the content-addressed store, hash-verified

10// Falls back to empty string only if ThunderDir resolution fails, which
11// callers should treat as "no cached key".
12func GetKeyFile(uuid string) string {
13 base, err := ThunderDir()
14 if err != nil {
15 return ""
16 }
17 return filepath.Join(base, "keys", uuid)
18}
19
20// KeyExists checks if the SSH key file exists for a given UUID
21func KeyExists(uuid string) bool {

Callers 5

runSCPFunction · 0.92
runConnectWithOptionsFunction · 0.92
UpdateSSHConfigFunction · 0.85
KeyExistsFunction · 0.85

Calls 1

ThunderDirFunction · 0.85

Tested by 1