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

Method clientIP

server/conn.go:564–572  ·  view source on GitHub ↗

clientIP returns the connection's client IP as a string, or "" if unavailable (e.g. a non-TCP conn or in tests). Used for the redacted Errors-page snapshot.

()

Source from the content-addressed store, hash-verified

562 c.cancel()
563 return
564 }
565 // Data available (e.g. pipelined Sync message) — safe in the
566 // bufio.Reader buffer. Throttle to avoid busy-waiting since
567 // Peek returns instantly when data is already buffered.
568 select {
569 case <-done:
570 return
571 case <-ctx.Done():
572 return
573 case <-time.After(50 * time.Millisecond):
574 continue
575 }

Callers 1

logQueryErrorMethod · 0.95

Calls 2

RemoteAddrMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected