Documentation ¶
Overview ¶
Package mock provides a virtual routing server. To use it, create a virtual routing server and use the Client() method to get a routing client (IpfsRouting). The server quacks like a DHT but is really a local in-memory hash table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { FindProviders(context.Context, *cid.Cid) ([]pstore.PeerInfo, error) routing.IpfsRouting }
Client implements IpfsRouting
type DelayConfig ¶
type Server ¶
type Server interface { Client(p testutil.Identity) Client ClientWithDatastore(context.Context, testutil.Identity, ds.Datastore) Client }
Server provides mockrouting Clients
func NewDHTNetwork ¶
func NewServerWithDelay ¶
func NewServerWithDelay(conf DelayConfig) Server
NewServerWithDelay returns a mockrouting Server with a delay!
Click to show internal directories.
Click to hide internal directories.