Documentation
¶
Overview ¶
Package reuse carries previously uploaded payload chunks through a v2 payload stream. With metadata change detection the archive generator does not re-read files whose metadata matches the previous snapshot; instead the payload stream tells the uploader which chunks of the previous payload archive to reference at that point. The stream is framed so that data and chunk injections stay in order without any side channel.
Framing: an 8-byte magic ("GOPBSRU1"), then frames of a 1-byte kind and an 8-byte little-endian body length. KindData bodies are payload bytes to be chunked and uploaded; KindInject bodies hold 40-byte entries (32-byte digest + u64 size) of chunks to append to the index as-is, in order.
Index ¶
Constants ¶
const ( KindData byte = 0 KindInject byte = 1 )
Frame kinds
const Magic = "GOPBSRU1"
Magic starts a framed payload stream
Variables ¶
var ErrNotFramed = errors.New("reuse: stream is not framed")
ErrNotFramed reports a stream that does not start with the magic
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader demultiplexes a framed payload stream