Documentation ¶
Overview ¶
helper package for building car file of version 1
Index ¶
- func BlockWalk(ctx context.Context, node format.Node, bs format.NodeGetter, batchNum int, ...) error
- func GetNode(ctx context.Context, cid cid.Cid, bs blockstore.Blockstore) (format.Node, error)
- func NewOfflineNodeGetter(ng blockstore.Blockstore) *offlineng
- func NewOnlineNodeGetter(ng format.DAGService) *onlineng
- func PadCar(w io.Writer, carSize int64) error
- func PadCarFile(targetPath string) error
- func UnpadCarFile(targetPath string) error
- type BatchBuilder
- type Carv1Ref
- type DataRef
- type NullReader
- type RefType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNode ¶
func GetNode(ctx context.Context, cid cid.Cid, bs blockstore.Blockstore) (format.Node, error)
func NewOfflineNodeGetter ¶ added in v0.0.17
func NewOfflineNodeGetter(ng blockstore.Blockstore) *offlineng
func NewOnlineNodeGetter ¶ added in v0.0.17
func NewOnlineNodeGetter(ng format.DAGService) *onlineng
func PadCarFile ¶ added in v0.0.13
func UnpadCarFile ¶ added in v0.0.13
Types ¶
type BatchBuilder ¶
type BatchBuilder struct {
// contains filtered or unexported fields
}
func NewBatch ¶
func NewBatch(ctx context.Context, bs format.NodeGetter) *BatchBuilder
func (*BatchBuilder) Ref ¶ added in v0.0.17
func (b *BatchBuilder) Ref(root cid.Cid, batchNum int) (*Carv1Ref, error)
func (*BatchBuilder) WriteToFile ¶ added in v0.0.12
func (b *BatchBuilder) WriteToFile(root cid.Cid, outPath string, batchNum int) error
type Carv1Ref ¶ added in v0.0.17
func DecodeCarv1Ref ¶ added in v0.0.17
type NullReader ¶
type NullReader struct{}
Click to show internal directories.
Click to hide internal directories.