httprouting

package
v0.38.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 11 Imported by: 0

Documentation

Index

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) GetIPNS

func (r *MockHTTPContentRouter) GetIPNS(ctx context.Context, name ipns.Name) (*ipns.Record, error)

func (*MockHTTPContentRouter) NumFindProvidersCalls

func (r *MockHTTPContentRouter) NumFindProvidersCalls() int

func (*MockHTTPContentRouter) ProvideBitswap

nolint deprecated

func (*MockHTTPContentRouter) PutIPNS

func (r *MockHTTPContentRouter) PutIPNS(ctx context.Context, name ipns.Name, rec *ipns.Record) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL