pinconv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package pinconv converts pins between the dag-based ipldpinner and the datastore-based dspinner. Once conversion is complete, the pins from the source pinner are removed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPinsFromDSToIPLD

func ConvertPinsFromDSToIPLD(ctx context.Context, dstore ds.Datastore, dserv ipld.DAGService, internal ipld.DAGService) (ipfspinner.Pinner, int, error)

ConvertPinsFromDSToIPLD converts the pins stored in the datastore by dspinner, into pins stored in the given internal DAGService by ipldpinner. Returns an ipldpinner loaded with the converted pins, and a count of the recursive and direct pins converted.

After the pins are stored in the DAGService, the pins and their indexes are removed from the dspinner.

func ConvertPinsFromIPLDToDS

func ConvertPinsFromIPLDToDS(ctx context.Context, dstore ds.Datastore, dserv ipld.DAGService, internal ipld.DAGService) (ipfspinner.Pinner, int, error)

ConvertPinsFromIPLDToDS converts pins stored in mdag based storage to pins stores in the datastore. Returns a dspinner loaded with the converted pins, and a count of the recursive and direct pins converted.

After pins are stored in datastore, the root pin key is deleted to unlink the pin data in the DAGService.

Types

This section is empty.

Jump to

Keyboard shortcuts

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