Documentation
¶
Index ¶
- type Client
- func (c *Client) Bootstrap(ctx context.Context) error
- func (c *Client) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo, error)
- func (c *Client) FindProvidersAsync(ctx context.Context, k *cid.Cid, max int) <-chan pstore.PeerInfo
- func (c *Client) GetValue(ctx context.Context, k string) ([]byte, error)
- func (c *Client) GetValues(ctx context.Context, k string, _ int) ([]routing.RecvdVal, error)
- func (c *Client) Ping(ctx context.Context, id peer.ID) (time.Duration, error)
- func (c *Client) Provide(ctx context.Context, k *cid.Cid, brd bool) error
- func (c *Client) PutValue(ctx context.Context, k string, v []byte) error
- type Server
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
}
func NewClient ¶
TODO take in datastore/cache
func (*Client) FindPeer ¶
func (*Client) FindProvidersAsync ¶
func (*Client) GetValues ¶ added in v0.3.8
func (*Client) Provide ¶
Provide adds the given key 'k' to the content routing system. If 'brd' is true, it announces that content to the network. For the supernode client, setting 'brd' to false makes this call a no-op
Source Files
¶
- client.go
- server.go
Click to show internal directories.
Click to hide internal directories.