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
}
Client implements client side of shrex/nd protocol to obtain namespaced shares data from remote peers.
func NewClient ¶
func NewClient(params *Parameters, host host.Host) (*Client, error)
NewClient creates a new shrEx/nd client
func (*Client) RequestND ¶ added in v0.6.3
func (c *Client) RequestND( ctx context.Context, root *share.Root, namespace share.Namespace, peer peer.ID, ) (share.NamespacedShares, error)
RequestND requests namespaced data from the given peer. Returns shares with unverified inclusion proofs against the share.Root.
func (*Client) WithMetrics ¶ added in v0.9.2
type Parameters ¶
type Parameters = p2p.Parameters
Parameters is the set of parameters that must be configured for the shrex/eds protocol.
func DefaultParameters ¶
func DefaultParameters() *Parameters
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements server side of shrex/nd protocol to serve namespaced share to remote peers.
func NewServer ¶
func NewServer(params *Parameters, host host.Host, store *eds.Store, getter share.Getter) (*Server, error)
NewServer creates new Server
func (*Server) SetHandler ¶ added in v0.11.0
func (srv *Server) SetHandler(handler network.StreamHandler)
SetHandler sets server handler
func (*Server) WithMetrics ¶ added in v0.9.2
Click to show internal directories.
Click to hide internal directories.