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

Struct lazyCredsOpener

pubsub/gcppubsub/gcppubsub.go:125–129  ·  view source on GitHub ↗

lazyCredsOpener obtains Application Default Credentials on the first call to OpenTopicURL/OpenSubscriptionURL.

Source from the content-addressed store, hash-verified

123// lazyCredsOpener obtains Application Default Credentials on the first call
124// to OpenTopicURL/OpenSubscriptionURL.
125type lazyCredsOpener struct {
126 init sync.Once
127 opener *URLOpener
128 err error
129}
130
131func (o *lazyCredsOpener) defaultConn(ctx context.Context) (*URLOpener, error) {
132 o.init.Do(func() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected