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.