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