Documentation
¶
Index ¶
- func Join(ctx context.Context, in []io.Reader, s Strategy) (io.Reader, error)
- func JoinSimple(in []io.Reader) (io.Reader, error)
- func Split(ctx context.Context, in io.Reader, targetSize int, s Strategy, ...) error
- func SplitSimple(ctx context.Context, in io.Reader, targetSize int, out chan io.Reader) error
- func SplitTreewalk(ctx context.Context, r io.Reader, targetSize int, out chan io.Reader) error
- func SplitTreewalkFromBlockReader(ctx context.Context, root cid.Cid, br CarBlockReader, targetSize int, ...) error
- func SplitTreewalkFromPath(ctx context.Context, path string, targetSize int, out chan io.Reader) error
- type CarBlockReader
- type Strategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinSimple ¶ added in v0.1.1
Join together multiple CAR files that were split using the "simple" strategy into a single CAR file.
func SplitSimple ¶ added in v0.1.0
Split a CAR file and create multiple smaller CAR files using the "simple" strategy.
func SplitTreewalk ¶ added in v0.1.0
Split a CAR file and create multiple smaller CAR files using the "treewalk" strategy. Note: the entire CAR will be cached in memory. Use SplitTreewalkFromPath or SplitTreewalkFromBlockReader for non-memory bound splitting.
func SplitTreewalkFromBlockReader ¶ added in v0.2.0
func SplitTreewalkFromBlockReader(ctx context.Context, root cid.Cid, br CarBlockReader, targetSize int, out chan io.Reader) error
Split a CAR file (passed as a root CID and a block reader populated with the blocks from the CAR) and create multiple smaller CAR files using the "treewalk" strategy.
Types ¶
type CarBlockReader ¶ added in v0.1.0
type Strategy ¶
type Strategy int
Strategy describes how CAR files should be split.
const ( // Simple is fast but naive, only the first CAR output has a root CID, // subsequent CARs have a placeholder "empty" CID. Simple Strategy = iota // Treewalk walks the DAG to pack sub-graphs into each CAR file that is // output. Every CAR has the same root CID, but contains a different portion // of the DAG. Treewalk )
Click to show internal directories.
Click to hide internal directories.