Documentation ¶
Overview ¶
Package bundle defines methods for bundling snapshots together so they can be imported and/or exported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶
func Export(ctx context.Context, s *storage.LocalFiles, path string, snapshots []*snapshot.Hash, exclude []*snapshot.Hash, metadata map[string]io.ReadCloser, recurseParents bool) (included []*snapshot.Hash, err error)
Export writes a bundle with the specified snapshots to the given writer.
If the returned error is nil, then the written bundle will include the specified snapshots, and their contents. For any snapshots of a directory, the bundle will also recursively include the snapshots for the children of that directory.
The `exclude` argument specifies a list of objects (by hash) that will not be included in the resulting bundle even if they otherwise would have been.
The `metadata` argument specifies an additional map of key/value pairs to include in the bundle in a separate subpath from the bundled objects.