dag

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnixfsAPI

type UnixfsAPI interface {
	GenerateDag(ctx context.Context, reader io.Reader) (cid.Cid, error)

	// free the DAG stored on disk, thereby freeing up space
	// to be used only if the dag is persisted on disk
	// this would also do a GC in order to make the space immediately
	// available
	RemoveDag(ctx context.Context, cid cid.Cid) error
}

generate the merkle dag from content provided by the reader. There are various ways to generate merkle dag for some content. The implementors of this interface should capture those settings. Note that this means that those settings remain the same for an instance (across all requests on that instance). Though some implementor can use context to change the settings per request.

func NewUnixfsAPI

func NewUnixfsAPI(ipfs coreapi.CoreExtensionAPI, cidVersion int, cidGenerationOnly bool) UnixfsAPI

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL