writeFileMap uploads chunks of r to bs while populating fileMap and finally uploading fileMap. The returned blobref is of fileMap's JSON blob. It uses rolling checksum for the chunks sizes.
(ctx context.Context, bs blobserver.StatReceiver, file *Builder, r io.Reader)
| 263 | // finally uploading fileMap. The returned blobref is of fileMap's |
| 264 | // JSON blob. It uses rolling checksum for the chunks sizes. |
| 265 | func writeFileMapRolling(ctx context.Context, bs blobserver.StatReceiver, file *Builder, r io.Reader) (blob.Ref, error) { |
| 266 | n, spans, err := writeFileChunks(ctx, bs, file, r) |
| 267 | if err != nil { |
| 268 | return blob.Ref{}, err |
| 269 | } |
| 270 | // The top-level content parts |
| 271 | return uploadBytes(ctx, bs, file, n, spans).Get() |
| 272 | } |
| 273 | |
| 274 | // WriteFileChunks uploads chunks of r to bs while populating file. |
| 275 | // It does not upload file. |
no test coverage detected