indexerlookup

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 2

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

func WithAsyncResultsChanBuffer(i int) Option

WithAsyncResultsChanBuffer sets the channel buffer returned by IndexerCandidateSource.FindCandidates. Defaults to 1 if unspecified.

func WithHttpClient added in v0.4.0

func WithHttpClient(c *http.Client) Option

WithHttpClient sets the http.Client used to contact the indexer. Defaults to http.DefaultClient if unspecified.

func WithHttpClientTimeout added in v0.4.0

func WithHttpClientTimeout(t time.Duration) Option

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

func WithHttpEndpoint(e *url.URL) Option

WithHttpEndpoint sets the indexer HTTP API endpoint. Defaults to https://cid.contact if unspecified.

func WithHttpUserAgent added in v0.4.0

func WithHttpUserAgent(a string) Option

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

func WithIpfsDhtCascade(b bool) Option

WithIpfsDhtCascade sets weather to cascade lookups onto the IPFS DHT. Enabled by default if unspecified.

func WithLegacyCascade added in v0.6.9

func WithLegacyCascade(b bool) Option

WithLegacyCascade sets weather to cascade finds legacy providers connecting only over bitswap Enabled by default if unspecified.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL