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, size int) (*EndpointFinder, error)
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
Click to show internal directories.
Click to hide internal directories.