Documentation ¶
Index ¶
- Variables
- type BucketCreator
- type FilRetrieval
- func (fr *FilRetrieval) Close() error
- func (fr *FilRetrieval) CreateForNewBucket(ctx context.Context, accKey string, dbID thread.ID, dbToken thread.Token, ...) (string, error)
- func (fr *FilRetrieval) GetAllByAccount(accKey string) ([]Retrieval, error)
- func (fr *FilRetrieval) GetByAccountAndID(accKey string, jobID string) (Retrieval, error)
- func (fr *FilRetrieval) Logs(ctx context.Context, accKey string, jobID string, powToken string, ...) error
- func (fr *FilRetrieval) RunDaemon()
- func (fr *FilRetrieval) SetBucketCreator(bc BucketCreator)
- type Retrieval
- type Status
- type TrackerRetrievalRegistrator
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CITest = false
)
Functions ¶
This section is empty.
Types ¶
type BucketCreator ¶
type BucketCreator interface { // CreateBucket creates a bucket with the provided information. CreateBucket(ctx context.Context, threadID thread.ID, threadToken thread.Token, buckName string, buckPrivate bool, dataCid cid.Cid) error }
BucketCreator provides creating bucket functionality.
type FilRetrieval ¶
type FilRetrieval struct {
// contains filtered or unexported fields
}
FilRetrieval manages Retrievals from Accounts in go-datastore.
func NewFilRetrieval ¶
func NewFilRetrieval( ds datastore.TxnDatastore, pgc *powc.Client, trr TrackerRetrievalRegistrator, jfe <-chan archive.JobEvent, is string, ) (*FilRetrieval, error)
func (*FilRetrieval) Close ¶
func (fr *FilRetrieval) Close() error
Close closes gracefully all background work that is being executed.
func (*FilRetrieval) CreateForNewBucket ¶
func (fr *FilRetrieval) CreateForNewBucket( ctx context.Context, accKey string, dbID thread.ID, dbToken thread.Token, buckName string, buckPrivate bool, dataCid cid.Cid, powToken string, ) (string, error)
CreateForNewBucket creates a queued Retrieval to bootstrap a new bucket with the provided information, only if the retrieval succeeds.
func (*FilRetrieval) GetAllByAccount ¶
func (fr *FilRetrieval) GetAllByAccount(accKey string) ([]Retrieval, error)
func (*FilRetrieval) GetByAccountAndID ¶
func (fr *FilRetrieval) GetByAccountAndID(accKey string, jobID string) (Retrieval, error)
func (*FilRetrieval) RunDaemon ¶
func (fr *FilRetrieval) RunDaemon()
func (*FilRetrieval) SetBucketCreator ¶
func (fr *FilRetrieval) SetBucketCreator(bc BucketCreator)
type Retrieval ¶
type Retrieval struct { Type Type AccountKey string PowToken string JobID string Cid cid.Cid Selector string Status Status FailureCause string CreatedAt int64 // If Type == RetrievalTypeNewBucket DbID thread.ID DbToken thread.Token Name string Private bool // If Type == RetrievalTypeExistingBucket BuckKey string BuckPath string }
Click to show internal directories.
Click to hide internal directories.