MCPcopy Create free account
hub / github.com/PostHog/duckgres / MatchKey

Method MatchKey

controlplane/worker_state.go:43–48  ·  view source on GitHub ↗

MatchKey is the identity used to decide whether an existing worker can serve a request. A nil profile shares the key of the zero/default profile, so legacy and default requests match the same workers.

()

Source from the content-addressed store, hash-verified

41// request. A nil profile shares the key of the zero/default profile, so legacy
42// and default requests match the same workers.
43func (wp *WorkerProfile) MatchKey() string {
44 if wp == nil {
45 return "|"
46 }
47 return wp.CPU + "|" + wp.Memory
48}
49
50// Equal reports whether two profiles match (nil == zero == default).
51func (wp *WorkerProfile) Equal(other *WorkerProfile) bool {

Calls

no outgoing calls