powergate: github.com/textileio/powergate/ffs/scheduler/internal/cistore Index | Files

package cistore

import "github.com/textileio/powergate/ffs/scheduler/internal/cistore"


Package Files



var (

    // ErrNotFound indicates the instance doesn't exist.
    ErrNotFound = errors.New("storage info not found")

type Store Uses

type Store struct {
    // contains filtered or unexported fields

Store is an Datastore implementation of StorageInfoStore.

func New Uses

func New(ds datastore.Datastore) *Store

New returns a new JobStore backed by the Datastore.

func (*Store) Get Uses

func (s *Store) Get(iid ffs.APIID, c cid.Cid) (ffs.StorageInfo, error)

Get gets the current stored state of a Cid.

func (*Store) List Uses

func (s *Store) List(iids []ffs.APIID, cids []cid.Cid) ([]ffs.StorageInfo, error)

List returns a list of StorageInfo matching any provided query options.

func (*Store) Put Uses

func (s *Store) Put(ci ffs.StorageInfo) error

Put saves a new storage state for a Cid.

Package cistore imports 11 packages (graph) and is imported by 2 packages. Updated 2021-01-27. Refresh now. Tools for package owners.