You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -48,13 +48,15 @@ See [MAINTAINERS.md](https://github.com/thanos-io/thanos/blob/main/MAINTAINERS.m
48
48
49
49
The core this module is the [`Bucket` interface](objstore.go):
50
50
51
-
```go mdox-exec="sed -n '39,55p' objstore.go"
51
+
```go mdox-exec="sed -n '55,73p' objstore.go"
52
52
// Bucket provides read and write access to an object storage bucket.
53
53
// NOTE: We assume strong consistency for write-read flow.
54
54
typeBucketinterface {
55
55
io.Closer
56
56
BucketReader
57
57
58
+
Provider() ObjProvider
59
+
58
60
// Upload the contents of the reader as an object into the bucket.
59
61
// Upload should be idempotent.
60
62
Upload(ctx context.Context, name string, r io.Reader) error
@@ -70,7 +72,7 @@ type Bucket interface {
70
72
71
73
All [provider implementations](providers) have to implement `Bucket` interface that allows common read and write operations that all supported by all object providers. If you want to limit the code that will do bucket operation to only read access (smart idea, allowing to limit access permissions), you can use the [`BucketReader` interface](objstore.go):
72
74
73
-
```go mdox-exec="sed -n '71,106p' objstore.go"
75
+
```go mdox-exec="sed -n '89,124p' objstore.go"
74
76
// BucketReader provides read access to an object storage bucket.
75
77
typeBucketReaderinterface {
76
78
// Iter calls f for each entry in the given directory (not recursive.). The argument to f is the full
// Upload the contents of the reader as an object into the bucket.
72
74
func (b*Bucket) Upload(_ context.Context, namestring, r io.Reader) error {
73
75
// TODO(https://github.com/thanos-io/thanos/issues/678): Remove guessing length when minio provider will support multipart upload without this.
0 commit comments