Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllChunkSums ¶
func AllChunkSums(lister drive.ChunkLister) ([][]byte, error)
AllChunkSums iterates lister. It gathers and returns all of the sums.
Nb: It is intended only for use on relatively small Shade repositorites. Depending on the client, it may consume a lot of ram and take a very long time to run.
func Equal ¶
Equal returns true if client a and b return the same sums via ListFiles and their ChunkLister interface.
See the disclaimers for GetDelta, which this is a thin veneer on top of.
func GetDelta ¶
GetDelta iterates the files and chunks in two drive clients, and returns two Delta structs, containing slices of files and chunks. The return values are:
- files and chunks that a has that b does not
- files and chunks that b has that a does not
- an error, if one was encountered
Nb: This is intended only for use on relatively small Shade repositorites, primarily for testing. Depending on the client, it may consume a lot of ram and take a very long time to run.
Nb: it does not validate the clients contain the same actual bytes, it trusts the sums reported by ListFiles and the ChunkLister interface.