Documentation
¶
Index ¶
- func GenerateNoDupes(gen func() unixfs.DirEntry) unixfs.DirEntry
- func GenerateStrictlyNestedShardedDir(t *testing.T, linkSys *linking.LinkSystem, randReader io.Reader, ...) unixfs.DirEntry
- func ToBlocks(t *testing.T, lsys linking.LinkSystem, root cid.Cid, selNode datamodel.Node) []blocks.Block
- type CorrectedMemStore
- type ParentStore
- type ZeroReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNoDupes ¶
GenerateNoDupes runs the unixfsnode/testutil generator function repeatedly until it produces a DAG with strictly no duplicate CIDs.
func GenerateStrictlyNestedShardedDir ¶
func GenerateStrictlyNestedShardedDir(t *testing.T, linkSys *linking.LinkSystem, randReader io.Reader, targetSize int) unixfs.DirEntry
GenerateStrictlyNestedShardedDir is a wrapper around unixfsnode/testutil.GenerateDirectory that uses dark magic to repeatedly generate a sharded directory until it produces one that is strictly nested. That is, it produces a sharded directory structure with strictly at least one level of sharding with at least two child shards.
Since it is possible to produce a sharded directory that is contained in a single block, this function provides a way to generate a sharded directory for cases where we need to test multi-level sharding.
Types ¶
type CorrectedMemStore ¶
type CorrectedMemStore struct {
ParentStore
}
TODO: remove when this is fixed in IPLD prime
func (*CorrectedMemStore) GetStream ¶
func (cms *CorrectedMemStore) GetStream(ctx context.Context, key string) (io.ReadCloser, error)
type ParentStore ¶
type ParentStore interface {
storage.ReadableStorage
storage.StreamingReadableStorage
storage.WritableStorage
}
type ZeroReader ¶
type ZeroReader struct{}