Documentation
      ¶
    
    
  
    
  
    Index ¶
- type MockHTTPContentRouter
 - func (r *MockHTTPContentRouter) AddProvider(key cid.Cid, record types.Record)
 - func (r *MockHTTPContentRouter) FindPeers(ctx context.Context, pid peer.ID, limit int) (iter.ResultIter[*types.PeerRecord], error)
 - func (r *MockHTTPContentRouter) FindProviders(ctx context.Context, key cid.Cid, limit int) (iter.ResultIter[types.Record], error)
 - func (r *MockHTTPContentRouter) GetIPNS(ctx context.Context, name ipns.Name) (*ipns.Record, error)
 - func (r *MockHTTPContentRouter) NumFindProvidersCalls() int
 - func (r *MockHTTPContentRouter) ProvideBitswap(ctx context.Context, req *server.BitswapWriteProvideRequest) (time.Duration, error)
 - func (r *MockHTTPContentRouter) PutIPNS(ctx context.Context, name ipns.Name, rec *ipns.Record) error
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockHTTPContentRouter ¶
type MockHTTPContentRouter struct {
	Debug bool
	// contains filtered or unexported fields
}
    MockHTTPContentRouter provides /routing/v1 (https://specs.ipfs.tech/routing/http-routing-v1/) server implementation based on github.com/ipfs/boxo/routing/http/server
func (*MockHTTPContentRouter) AddProvider ¶
func (r *MockHTTPContentRouter) AddProvider(key cid.Cid, record types.Record)
AddProvider adds a record for a given CID
func (*MockHTTPContentRouter) FindPeers ¶
func (r *MockHTTPContentRouter) FindPeers(ctx context.Context, pid peer.ID, limit int) (iter.ResultIter[*types.PeerRecord], error)
func (*MockHTTPContentRouter) FindProviders ¶
func (r *MockHTTPContentRouter) FindProviders(ctx context.Context, key cid.Cid, limit int) (iter.ResultIter[types.Record], error)
func (*MockHTTPContentRouter) NumFindProvidersCalls ¶
func (r *MockHTTPContentRouter) NumFindProvidersCalls() int
func (*MockHTTPContentRouter) ProvideBitswap ¶
func (r *MockHTTPContentRouter) ProvideBitswap(ctx context.Context, req *server.BitswapWriteProvideRequest) (time.Duration, error)
nolint deprecated
 Click to show internal directories. 
   Click to hide internal directories.