Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexerCandidateFinder ¶
type IndexerCandidateFinder struct {
// contains filtered or unexported fields
}
func NewCandidateFinder ¶
func NewCandidateFinder(o ...Option) (*IndexerCandidateFinder, error)
func (*IndexerCandidateFinder) FindCandidates ¶
func (idxf *IndexerCandidateFinder) FindCandidates(ctx context.Context, cid cid.Cid) ([]types.RetrievalCandidate, error)
func (*IndexerCandidateFinder) FindCandidatesAsync ¶ added in v0.4.0
func (idxf *IndexerCandidateFinder) FindCandidatesAsync(ctx context.Context, c cid.Cid, cb func(types.RetrievalCandidate)) error
type Option ¶ added in v0.4.0
type Option func(*options) error
func WithAsyncResultsChanBuffer ¶ added in v0.4.0
WithAsyncResultsChanBuffer sets the channel buffer returned by IndexerCandidateFinder.FindCandidatesAsync. Defaults to 1 if unspecified.
func WithHttpClient ¶ added in v0.4.0
WithHttpClient sets the http.Client used to contact the indexer. Defaults to http.DefaultClient if unspecified.
func WithHttpClientTimeout ¶ added in v0.4.0
WithHttpClientTimeout sets the timeout for the HTTP requests sent to the indexer. Defaults to one minute if unspecified.
func WithHttpEndpoint ¶ added in v0.4.0
WithHttpEndpoint sets the indexer HTTP API endpoint. Defaults to https://cid.contact if unspecified.
func WithHttpUserAgent ¶ added in v0.4.0
WithHttpUserAgent sets the User-Agent header value when contacting the indexer HTTP API. Setting this option to empty string will disable inclusion of User-Agent header. Defaults to "lassie" if unspecified.
func WithIpfsDhtCascade ¶ added in v0.4.0
WithIpfsDhtCascade sets weather to cascade lookups onto the IPFS DHT. Enabled by default if unspecified.
func WithLegacyCascade ¶ added in v0.6.9
WithLegacyCascade sets weather to cascade finds legacy providers connecting only over bitswap Enabled by default if unspecified.