finderp2pclient

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0, MIT Imports: 11 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
}

func New

func New(p2pHost host.Host, peerID peer.ID) (*Client, error)

func (*Client) Connect

func (c *Client) Connect(ctx context.Context, hostname string) error

Connect connects the client to the host at the location specified by hostname. The value of hostname is a host or host:port, where the host is a hostname or IP address.

func (*Client) ConnectAddrs

func (c *Client) ConnectAddrs(ctx context.Context, maddrs ...multiaddr.Multiaddr) error

func (*Client) Find

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

func (*Client) FindBatch

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

func (*Client) GetProvider added in v0.3.0

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

func (*Client) GetStats added in v0.4.18

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

func (*Client) ListProviders added in v0.3.0

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