Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates the instance doesn't exist. ErrNotFound = errors.New("action not found") )
Functions ¶
This section is empty.
Types ¶
type RetrievalAction ¶ added in v0.6.0
type RetrievalAction struct { APIID ffs.APIID RetrievalID ffs.RetrievalID PayloadCid cid.Cid PieceCid cid.Cid Selector string Miners []string WalletAddress string MaxPrice uint64 }
RetrievalAction contains information necessary to execute a RetrievalJob.
type StorageAction ¶ added in v0.6.0
type StorageAction struct { APIID ffs.APIID Cid cid.Cid Cfg ffs.StorageConfig ReplacedCid cid.Cid }
StorageAction contains information necessary to execute a StorageJob.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists Actions.
func New ¶
func New(ds datastore.Datastore) *Store
New returns a new ActionStore backed by the Datastore.
func (*Store) GetRetrievalAction ¶ added in v0.6.0
func (s *Store) GetRetrievalAction(jid ffs.JobID) (RetrievalAction, error)
GetRetrievalAction returns a the RetrievalAction corresponding to the RetrievalJob id.
func (*Store) GetStorageAction ¶ added in v0.6.0
func (s *Store) GetStorageAction(jid ffs.JobID) (StorageAction, error)
GetStorageAction gets an action for a JobID. If doesn't exist, returns ErrNotFound.
func (*Store) PutRetrievalAction ¶ added in v0.6.0
func (s *Store) PutRetrievalAction(jid ffs.JobID, a RetrievalAction) error
PutRetrievalAction saves the RetrievalAction corresponding to a RetrievalJob.
func (*Store) PutStorageAction ¶ added in v0.6.0
func (s *Store) PutStorageAction(jid ffs.JobID, a StorageAction) error
PutStorageAction saves a new Action for a Job.
Click to show internal directories.
Click to hide internal directories.