master
go 31 lines 699 Bytes
Raw
1 package routing
2
3 import (
4 "context"
5
6 routinghelpers "github.com/libp2p/go-libp2p-routing-helpers"
7 "github.com/libp2p/go-libp2p/core/routing"
8 )
9
10 type ProvideManyRouter interface {
11 routinghelpers.ProvideManyRouter
12 routing.Routing
13 }
14
15 var (
16 _ routing.Routing = &httpRoutingWrapper{}
17 _ routinghelpers.ProvideManyRouter = &httpRoutingWrapper{}
18 )
19
20 // httpRoutingWrapper is a wrapper needed to construct the routing.Routing interface from
21 // http delegated routing.
22 type httpRoutingWrapper struct {
23 routing.ContentRouting
24 routing.PeerRouting
25 routing.ValueStore
26 routinghelpers.ProvideManyRouter
27 }
28
29 func (c *httpRoutingWrapper) Bootstrap(ctx context.Context) error {
30 return nil
31 }