Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexerCandidateSource ¶ added in v0.22.0
type IndexerCandidateSource struct {
// contains filtered or unexported fields
}
func NewCandidateSource ¶ added in v0.22.0
func NewCandidateSource(o ...Option) (*IndexerCandidateSource, error)
func (*IndexerCandidateSource) FindCandidates ¶ added in v0.22.0
func (idxf *IndexerCandidateSource) FindCandidates(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 IndexerCandidateSource.FindCandidates. 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.