lp2ptransports

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0, MIT Imports: 12 Imported by: 0

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

View Source
var BindnodeRegistry = bindnoderegistry.NewRegistry()

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	// The name of the transport protocol eg "libp2p" or "http"
	Name string
	// The address of the endpoint in multiaddr format
	Addresses []multiaddr.Multiaddr
}

type QueryResponse

type QueryResponse struct {
	Protocols []Protocol
}

type TransportsClient

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

TransportsClient sends retrieval queries over libp2p

func NewTransportsClient

func NewTransportsClient(h host.Host) *TransportsClient

NewTransportsClient creates a new query over libp2p

func (*TransportsClient) SendQuery

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

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

Jump to

Keyboard shortcuts

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