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

Method OpenCollection

docstore/urls.go:56–62  ·  view source on GitHub ↗

OpenCollection calls OpenCollectionURL with the URL parsed from urlstr. OpenCollection is safe to call from multiple goroutines.

(ctx context.Context, urlstr string)

Source from the content-addressed store, hash-verified

54// OpenCollection calls OpenCollectionURL with the URL parsed from urlstr.
55// OpenCollection is safe to call from multiple goroutines.
56func (mux *URLMux) OpenCollection(ctx context.Context, urlstr string) (*Collection, error) {
57 opener, u, err := mux.schemes.FromString("Collection", urlstr)
58 if err != nil {
59 return nil, err
60 }
61 return opener.(CollectionURLOpener).OpenCollectionURL(ctx, u)
62}
63
64// OpenCollectionURL dispatches the URL to the opener that is registered with
65// the URL's scheme. OpenCollectionURL is safe to call from multiple goroutines.

Callers 3

OpenCollectionFunction · 0.80
TestURLMuxFunction · 0.80
ExampleOpenCollectionFunction · 0.80

Calls 2

FromStringMethod · 0.80
OpenCollectionURLMethod · 0.65

Tested by 2

TestURLMuxFunction · 0.64
ExampleOpenCollectionFunction · 0.64