Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiStore ¶
type MultiStore struct {
// contains filtered or unexported fields
}
MultiStore is a wrapper around a datastore that provides multiple isolated instances of IPFS storage components -> BlockStore, FileStore, DAGService, etc
func NewMultiDstore ¶
func NewMultiDstore(ds datastore.Batching) (*MultiStore, error)
NewMultiDstore returns a new instance of a MultiStore for the given datastore instance
func (*MultiStore) Delete ¶
func (mds *MultiStore) Delete(i StoreID) error
Delete deletes the store with the given id, including all of its data
func (*MultiStore) Get ¶
func (mds *MultiStore) Get(i StoreID) (*Store, error)
Get returns the store for the given ID
func (*MultiStore) List ¶
func (mds *MultiStore) List() StoreIDList
List returns a list of all known store IDs
func (*MultiStore) MultiReadBlockstore ¶
func (mds *MultiStore) MultiReadBlockstore() blockstore.Blockstore
MultiReadBlockstore returns a single Blockstore that will try to read from all of the blockstores tracked by this multistore
func (*MultiStore) Next ¶
func (mds *MultiStore) Next() StoreID
Next returns the next available StoreID
type Store ¶
type Store struct { Fstore *filestore.Filestore Bstore blockstore.Blockstore DAG ipld.DAGService Loader ipldprime.Loader Storer ipldprime.Storer // contains filtered or unexported fields }
Store is a single store instance returned by the MultiStore. it gives public access to the blockstore, filestore, dag service, and an ipld-prime loader/storer
type StoreIDList ¶ added in v0.0.2
type StoreIDList []StoreID
StoreIDList is just a list of StoreID that implements sort.Interface
func (StoreIDList) Len ¶ added in v0.0.2
func (s StoreIDList) Len() int
func (StoreIDList) Less ¶ added in v0.0.2
func (s StoreIDList) Less(i, j int) bool
func (StoreIDList) Swap ¶ added in v0.0.2
func (s StoreIDList) Swap(i, j int)