Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
Wrapped blockstore.Blockstore
}
Adapter implements go-ipld-prime/storage.ReadableStorage and go-ipld-prime/storage.WritableStorage backed by a go-ipfs-blockstore.Blockstore.
The go-ipfs-blockstore.Blockstore may internally have other configuration. We don't interfere with that here; such configuration should be handled when creating the go-ipfs-blockstore value.
Note that this system will only work for certain structures of keys -- this is because the blockstore API works on the level of CIDs. As long as your key string is the binary form of a CID, it will work correctly. Other keys are not possible to support with this adapter.
Contexts given to this system are checked for errors at the beginning of an operation, but otherwise have no effect, because the Blockstore API doesn't accept context parameters.