p2pclient

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: 12 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) Announce deprecated

func (c *Client) Announce(ctx context.Context, provider *peer.AddrInfo, root cid.Cid) error

Deprecated: Use gossip sub instead for sending announce message,

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) IndexContent

func (c *Client) IndexContent(ctx context.Context, providerID peer.ID, privateKey p2pcrypto.PrivKey, m multihash.Multihash, contextID []byte, metadata []byte, addrs []string) error

func (*Client) Register

func (c *Client) Register(ctx context.Context, providerID peer.ID, privateKey p2pcrypto.PrivKey, addrs []string) error

Jump to

Keyboard shortcuts

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