FromBucket returns an interface that fetches files from the given blob bucket.
(ctx context.Context, bucket *blob.Bucket, root string)
| 56 | |
| 57 | // FromBucket returns an interface that fetches files from the given blob bucket. |
| 58 | func 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 | } |