Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHTTPNotSupported = errors.New("provider does not support http")
ErrHTTPNotSupported indicates we were able to look up the provider and contact them, but they reported that they do not serve HTTP retrievals
Functions ¶
This section is empty.
Types ¶
type EndpointFinder ¶
type EndpointFinder struct {
// contains filtered or unexported fields
}
EndpointFinder handles translating SP miner addresses to HTTP retrieval endpoints for those miners, use the chain and the SP retrieval transports protocol. It also caches records for performance
func NewEndpointFinder ¶
func NewEndpointFinder(minerInfoFetcher MinerInfoFetcher, h host.Host, opts ...Option) *EndpointFinder
NewEndpointFinder returns a new instance of an EndpointFinder
func (*EndpointFinder) FindHTTPEndpoints ¶
func (ef *EndpointFinder) FindHTTPEndpoints(ctx context.Context, sps []string) ([]peer.AddrInfo, error)
FindHTTPEndpoints finds http endpoints for a given set of providers
type MinerInfoFetcher ¶
type MinerInfoFetcher interface {
GetProviderInfo(ctx context.Context, provider string) (*replication.MinerInfo, error)
}
MinerInfoFetcher is an interface for looking up chain miner info from an SP name
type Option ¶ added in v0.5.9
type Option func(*config)
func WithErrorLruSize ¶ added in v0.5.9
func WithErrorLruTimeout ¶ added in v0.5.9
func WithLruSize ¶ added in v0.5.9
func WithLruTimeout ¶ added in v0.5.9
Click to show internal directories.
Click to hide internal directories.