aboutsummaryrefslogtreecommitdiff
path: root/object/store/reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/store/reader.go')
-rw-r--r--object/store/reader.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/object/store/reader.go b/object/store/reader.go
index 7979fb6c..bbfe1fe8 100644
--- a/object/store/reader.go
+++ b/object/store/reader.go
@@ -23,12 +23,21 @@ type ObjectReader interface {
// Users should treat this as an invariant;
// implementations should not re-verify it on every read.
//
- // Labels: Life-Parent.
+ // The returned slice may alias storage owned by the backend,
+ // such as a memory-mapped pack or a shared cache buffer.
+ // Callers must not mutate it
+ // and must not retain it past the backend's lifetime.
+ //
+ // Labels: Life-Parent, Mut-No.
ReadBytesFull(id id.ObjectID) ([]byte, error)
// ReadBytesContent reads an object's type and content bytes.
//
- // Labels: Life-Parent.
+ // The returned slice may alias backend-owned storage.
+ // Callers must not mutate it
+ // and must not retain it past the backend's lifetime.
+ //
+ // Labels: Life-Parent, Mut-No.
ReadBytesContent(id id.ObjectID) (typ.Type, []byte, error)
// ReadReaderFull reads a full serialized object stream