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

Method OpenVariable

runtimevar/runtimevar.go:373–379  ·  view source on GitHub ↗

OpenVariable calls OpenVariableURL with the URL parsed from urlstr. OpenVariable is safe to call from multiple goroutines.

(ctx context.Context, urlstr string)

Source from the content-addressed store, hash-verified

371// OpenVariable calls OpenVariableURL with the URL parsed from urlstr.
372// OpenVariable is safe to call from multiple goroutines.
373func (mux *URLMux) OpenVariable(ctx context.Context, urlstr string) (*Variable, error) {
374 opener, u, err := mux.schemes.FromString("Variable", urlstr)
375 if err != nil {
376 return nil, err
377 }
378 return opener.(VariableURLOpener).OpenVariableURL(ctx, u)
379}
380
381// OpenVariableURL dispatches the URL to the opener that is registered with the
382// URL's scheme. OpenVariableURL is safe to call from multiple goroutines.

Callers 2

OpenVariableFunction · 0.80
TestURLMuxFunction · 0.80

Calls 2

FromStringMethod · 0.80
OpenVariableURLMethod · 0.65

Tested by 1

TestURLMuxFunction · 0.64