Documentation
¶
Index ¶
- type MultiStore
- func (mds *MultiStore) Close() error
- func (mds *MultiStore) Delete(ctx context.Context, i StoreID) error
- func (mds *MultiStore) Get(ctx context.Context, i StoreID) (*Store, error)
- func (mds *MultiStore) List() StoreIDList
- func (mds *MultiStore) MultiReadBlockstore() blockstore.Blockstore
- func (mds *MultiStore) Next() StoreID
- type Store
- type StoreID
- type StoreIDList
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 ¶
NewMultiDstore returns a new instance of a MultiStore for the given datastore instance
func (*MultiStore) Delete ¶
func (mds *MultiStore) Delete(ctx context.Context, i StoreID) error
Delete deletes the store with the given id, including all of its data
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 {
Bstore blockstore.Blockstore
DAG ipld.DAGService
LinkSystem ipldprime.LinkSystem
// contains filtered or unexported fields
}
Store is a single store instance returned by the MultiStore. it gives public access to the blockstore, dag service, and an ipld-prime linksystem
type StoreIDList ¶
type StoreIDList []StoreID
StoreIDList is just a list of StoreID that implements sort.Interface
func (StoreIDList) Len ¶
func (s StoreIDList) Len() int
func (StoreIDList) Less ¶
func (s StoreIDList) Less(i, j int) bool
func (StoreIDList) Swap ¶
func (s StoreIDList) Swap(i, j int)