finderhttpclient

package
v0.0.0-...-403c8b4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an http client for the indexer finder API

func New

func New(baseURL string, options ...httpclient.Option) (*Client, error)

New creates a new finder HTTP client.

func (*Client) Find

func (c *Client) Find(ctx context.Context, m multihash.Multihash) (*model.FindResponse, error)

Find queries indexer entries for a multihash

func (*Client) FindBatch

func (c *Client) FindBatch(ctx context.Context, mhs []multihash.Multihash) (*model.FindResponse, error)

FindBatch queries indexer entries for a batch of multihashes

func (*Client) GetProvider

func (c *Client) GetProvider(ctx context.Context, providerID peer.ID) (*model.ProviderInfo, error)

func (*Client) GetStats

func (c *Client) GetStats(ctx context.Context) (*model.Stats, error)

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context) ([]*model.ProviderInfo, error)

Jump to

Keyboard shortcuts

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