aboutsummaryrefslogtreecommitdiff
path: root/internal/queue/queue.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-03-24 19:21:20 -0400
committerJonathan Amsterdam <jba@google.com>2021-03-25 11:02:03 +0000
commit030d6bd4c085ea8d1dc4e94ce4d5e69736df9114 (patch)
tree8ac5b8d6471c2e1acf8b23f4584495a872916701 /internal/queue/queue.go
parent3f0673e901db30b9cd95f0759cdd26eee9752a16 (diff)
downloadgo-x-pkgsite-030d6bd4c085ea8d1dc4e94ce4d5e69736df9114.tar.xz
internal/database: wrap OpenCensus sql driver
The datbase/sql package provides a way to get at the underlying driver's connection. We will need that feature to access pgx's fast CopyFrom method. Unfortunately, we do not use the pgx driver directly. Instead, we wrap it in an OpenCensus driver for tracing and metrics. And that OpenCensus driver's connection does not allow us to dig into _it_ to retrieve the pgx connection that it wraps. Hence this dance: we must write our own driver and connection implementations. The driver return the connection, and the connection holds both the underlying (pgx) connection and the OpenCensus connection, to which it delegates. This CL is a no-op; everything behaves as before. But it lays the groundwork for a subsequent CL that will use pgx's CopyFrom. Change-Id: I5bf308aa23f07f20d1f6410ebb04cd6b9a5e0922 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304630 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/queue/queue.go')
0 files changed, 0 insertions, 0 deletions