MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / FromBucket

Function FromBucket

pkg/fetch/bucket.go:58–68  ·  view source on GitHub ↗

FromBucket returns an interface that fetches files from the given blob bucket.

(ctx context.Context, bucket *blob.Bucket, root string)

Source from the content-addressed store, hash-verified

56
57// FromBucket returns an interface that fetches files from the given blob bucket.
58func FromBucket(ctx context.Context, bucket *blob.Bucket, root string) Interface {
59 root = path.Clean(root)
60 return &bucketFetcher{
61 baseFetcher: baseFetcher{
62 latency: fetchLatency.WithLabelValues("bucket", root),
63 },
64 context: ctx,
65 bucket: bucket,
66 root: root,
67 }
68}

Callers 8

FetcherMethod · 0.92
FetcherMethod · 0.92
FetcherMethod · 0.92
FetcherMethod · 0.92
FetcherMethod · 0.92
FetcherMethod · 0.92
FetcherMethod · 0.92
TestBucketFunction · 0.85

Calls 2

CleanMethod · 0.45
WithLabelValuesMethod · 0.45

Tested by 1

TestBucketFunction · 0.68