lp2pimpl

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const TransportsProtocolID = protocol.ID("/fil/retrieval/transports/1.0.0")

TransportsProtocolID is the protocol for querying which retrieval transports the Storage Provider supports (http, libp2p, etc)

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryClientOption

type QueryClientOption func(*TransportsClient)

QueryClientOption is an option for configuring the libp2p storage deal client

func RetryParameters

func RetryParameters(minDuration time.Duration, maxDuration time.Duration, attempts float64, backoffFactor float64) QueryClientOption

RetryParameters changes the default parameters around connection reopening

type TransportsClient

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

TransportsClient sends retrieval queries over libp2p

func NewTransportsClient

func NewTransportsClient(h host.Host, options ...QueryClientOption) *TransportsClient

func (*TransportsClient) SendQuery

func (c *TransportsClient) SendQuery(ctx context.Context, id peer.ID) (*types.QueryResponse, error)

SendQuery sends a retrieval query over a libp2p stream to the peer

type TransportsListener

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

TransportsListener listens for incoming queries over libp2p

func NewTransportsListener

func NewTransportsListener(h host.Host, protos []types.Protocol) *TransportsListener

func (*TransportsListener) Start

func (p *TransportsListener) Start()

func (*TransportsListener) Stop

func (p *TransportsListener) Stop()

Jump to

Keyboard shortcuts

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