Generates a default client ID using the current hostname and time.
(startedAt time.Time)
| 2989 | |
| 2990 | // Generates a default client ID using the current hostname and time. |
| 2991 | func defaultClientID(startedAt time.Time) string { |
| 2992 | host, _ := os.Hostname() |
| 2993 | if host == "" { |
| 2994 | host = "unknown_host" |
| 2995 | } |
| 2996 | |
| 2997 | return defaultClientIDWithHost(startedAt, host) |
| 2998 | } |
| 2999 | |
| 3000 | // Same as the above, but allows host injection for testability. |
| 3001 | func defaultClientIDWithHost(startedAt time.Time, host string) string { |
searching dependent graphs…