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

Method registerConn

server/server.go:745–749  ·  view source on GitHub ↗

registerConn adds a client connection to the registry for pg_stat_activity.

(c *clientConn)

Source from the content-addressed store, hash-verified

743 s.activeQueriesMu.Lock()
744 // Lazily initialized: production servers get the map from New, but test
745 // fixtures (and InitMinimalServer paths) may construct a bare Server.
746 if s.activeQueries == nil {
747 s.activeQueries = make(map[BackendKey]context.CancelFunc)
748 }
749 s.activeQueries[key] = cancel
750 s.activeQueriesMu.Unlock()
751}
752

Callers 6

TestConnectionRegistryFunction · 0.95
TestInitConnsMapFunction · 0.95
runChildWorkerFunction · 0.95
serveMethod · 0.80
RunMessageLoopFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestConnectionRegistryFunction · 0.76
TestInitConnsMapFunction · 0.76