MCPcopy Index your code
hub / github.com/riverqueue/river / defaultClientID

Function defaultClientID

client.go:2991–2998  ·  view source on GitHub ↗

Generates a default client ID using the current hostname and time.

(startedAt time.Time)

Source from the content-addressed store, hash-verified

2989
2990// Generates a default client ID using the current hostname and time.
2991func 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.
3001func defaultClientIDWithHost(startedAt time.Time, host string) string {

Callers 2

TestDefaultClientIDFunction · 0.85
WithDefaultsMethod · 0.85

Calls 1

defaultClientIDWithHostFunction · 0.85

Tested by 1

TestDefaultClientIDFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…