Versions in this module Expand all Collapse all v1 v1.0.0 Jul 3, 2023 Changes in this version + type Content struct + CID string + type ErrorCode string + const CIDCodecNotSupported + const CannotConnect + const DealRejectedPricePerByteTooLow + const DealRejectedUnsealPriceTooLow + const DealStateMissing + const ErrorCodeNone + const InvalidPeerID + const NoAccess + const NoValidMultiAddrs + const NotFound + const NotOnline + const ProtocolNotSupported + const ResponseRejected + const RetrievalFailure + const Throttled + const Timeout + const UnconfirmedBlockTransfer + const UnderMaintenance + type ModuleName string + const Bitswap + const GraphSync + const HTTP + const Stub + type Provider struct + City string + Continent string + Country string + ID string + Multiaddrs []string + PeerID string + Region string + func (p Provider) GetPeerAddr() (peer.AddrInfo, error) + type Result struct + CreatedAt time.Time + Result RetrievalResult + Retriever Retriever + type RetrievalResult struct + Downloaded int64 + Duration time.Duration + ErrorCode ErrorCode + ErrorMessage string + Speed float64 + Success bool + TTFB time.Duration + func NewErrorRetrievalResult(code ErrorCode, err error) *RetrievalResult + func NewErrorRetrievalResultWithErrorResolution(code ErrorCode, err error) *RetrievalResult + func NewSuccessfulRetrievalResult(ttfb time.Duration, downloaded int64, duration time.Duration) *RetrievalResult + type Retriever struct + ASN string + City string + Continent string + Country string + ISP string + Latitude float32 + Longitude float32 + PublicIP string + Region string + type Task struct + Content Content + CreatedAt time.Time + Metadata map[string]string + Module ModuleName + Provider Provider + Requester string + Timeout time.Duration + type Worker interface + DoWork func(task Task) (*RetrievalResult, error) + type WorkerProcess struct + func NewTaskWorkerProcess(ctx context.Context, module ModuleName, worker Worker) (*WorkerProcess, error) + func (t WorkerProcess) Close() + func (t WorkerProcess) Poll(ctx context.Context) error