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()
Click to show internal directories.
Click to hide internal directories.