MCPcopy Create free account
hub / github.com/google/go-cloud / URLOpener

Struct URLOpener

postgres/gcppostgres/gcppostgres.go:90–97  ·  view source on GitHub ↗

URLOpener opens GCP PostgreSQL URLs like "gcppostgres://user:password@myproject/us-central1/instanceId/mydb".

Source from the content-addressed store, hash-verified

88// URLOpener opens GCP PostgreSQL URLs
89// like "gcppostgres://user:password@myproject/us-central1/instanceId/mydb".
90type URLOpener struct {
91 // CertSource specifies how the opener will obtain authentication information.
92 // CertSource must not be nil.
93 CertSource proxy.CertSource
94
95 // TraceOpts contains options for OpenTelemetry.
96 TraceOpts []otelsql.Option
97}
98
99// OpenPostgresURL opens a new GCP database connection wrapped with OpenTelemetry instrumentation.
100func (uo *URLOpener) OpenPostgresURL(ctx context.Context, u *url.URL) (*sql.DB, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected