Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDelegatedProvider ¶
A MockDelegatedProvider is the state of the http server acting as a counterparty to the HTTP delegated client.
func New ¶
func New() *MockDelegatedProvider
New creates a mock provider that can serve as a counterpart to the http delegated content routing client
func (*MockDelegatedProvider) Add ¶
func (m *MockDelegatedProvider) Add(c cid.Cid, peerAddr peer.AddrInfo, protocol uint64, md []byte) error
Add adds a record for the provider to return.
func (*MockDelegatedProvider) OnReq ¶
func (m *MockDelegatedProvider) OnReq(resp http.ResponseWriter, req *http.Request)
OnReq handles requests from the http delegated routing client
Click to show internal directories.
Click to hide internal directories.