Documentation
¶
Index ¶
- 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 SplitTreewalkWithBlockReader(ctx context.Context, root cid.Cid, br CarBlockReader, targetSize int, ...) error
- type CarBlockReader
- type Strategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
func SplitTreewalkWithBlockReader ¶ added in v0.1.0
func SplitTreewalkWithBlockReader(ctx context.Context, root cid.Cid, br CarBlockReader, targetSize int, out chan io.Reader) error
Split a CAR file and create multiple smaller CAR files using the "treewalk" strategy and passing in the root CID of the CAR and a block reader populated with the blocks from the CAR.
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.