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

Struct lazyCredsOpener

postgres/gcppostgres/gcppostgres.go:61–65  ·  view source on GitHub ↗

lazyCredsOpener obtains Application Default Credentials on the first call to OpenPostgresURL.

Source from the content-addressed store, hash-verified

59// lazyCredsOpener obtains Application Default Credentials on the first call
60// to OpenPostgresURL.
61type lazyCredsOpener struct {
62 init sync.Once
63 opener *URLOpener
64 err error
65}
66
67func (o *lazyCredsOpener) OpenPostgresURL(ctx context.Context, u *url.URL) (*sql.DB, error) {
68 o.init.Do(func() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected