Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockFetcher ¶
type BlockFetcher interface { // FetchBlocks retrieves blocks with the given cids from remote sources using the provided CandidateDownloadInfo FetchBlocks(ctx context.Context, cids []string, sdis []*types.SourceDownloadInfo) ([]*ErrMsg, []*types.Workload, []blocks.Block, error) }
BlockFetcher is an interface for fetching blocks from remote sources
type CandidateFetcher ¶
type CandidateFetcher struct {
// contains filtered or unexported fields
}
CandidateFetcher
func NewCandidateFetcher ¶
func NewCandidateFetcher(httpClient *http.Client) *CandidateFetcher
NewCandidateFetcher creates a new CandidateFetcher with the specified timeout and retry count
func (*CandidateFetcher) FetchBlocks ¶
func (c *CandidateFetcher) FetchBlocks(ctx context.Context, cids []string, sdis []*types.SourceDownloadInfo) ([]*ErrMsg, []*types.Workload, []blocks.Block, error)
FetchBlocks fetches blocks for the given cids and candidate download info
type IPFSClient ¶
type IPFSClient struct {
// contains filtered or unexported fields
}
IPFSClient
func NewIPFSClient ¶
func NewIPFSClient(ipfsAPIURL string) *IPFSClient
NewIPFSClient creates a new IPFSClient with the given API URL, timeout, and retry count
func (*IPFSClient) FetchBlocks ¶
func (ipfs *IPFSClient) FetchBlocks(ctx context.Context, cids []string, sdis []*types.SourceDownloadInfo) ([]*ErrMsg, []*types.Workload, []blocks.Block, error)
FetchBlocks retrieves blocks from IPFSClient using the provided context, CIDs, and download info
Click to show internal directories.
Click to hide internal directories.