Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
a7e1bf0f
Commit
a7e1bf0f
authored
Oct 22, 2018
by
vyzo
Browse files
call the routing interface BasicRouting, alias to top level type
parent
89aef893
Changes
3
Show whitespace changes
Inline
Side-by-side
config/config.go
View file @
a7e1bf0f
...
...
@@ -35,12 +35,12 @@ type AddrsFactory = bhost.AddrsFactory
// NATManagerC is a NATManager constructor.
type
NATManagerC
func
(
inet
.
Network
)
bhost
.
NATManager
type
Routing
interface
{
type
Basic
Routing
interface
{
routing
.
ContentRouting
routing
.
PeerRouting
}
type
RoutingC
func
(
host
.
Host
)
(
Routing
,
error
)
type
RoutingC
func
(
host
.
Host
)
(
Basic
Routing
,
error
)
// Config describes a set of settings for a libp2p node
//
...
...
libp2p.go
View file @
a7e1bf0f
...
...
@@ -15,6 +15,9 @@ type Config = config.Config
// (`libp2p.New`).
type
Option
=
config
.
Option
// BasicRouting is the combination of PeerRouting and ContentRouting
type
BasicRouting
=
config
.
BasicRouting
// ChainOptions chains multiple options into a single option.
func
ChainOptions
(
opts
...
Option
)
Option
{
return
func
(
cfg
*
Config
)
error
{
...
...
p2p/host/relay/autorelay_test.go
View file @
a7e1bf0f
...
...
@@ -8,7 +8,6 @@ import (
"time"
libp2p
"github.com/libp2p/go-libp2p"
config
"github.com/libp2p/go-libp2p/config"
relay
"github.com/libp2p/go-libp2p/p2p/host/relay"
ggio
"github.com/gogo/protobuf/io"
...
...
@@ -137,7 +136,7 @@ func TestAutoRelay(t *testing.T) {
defer
cancel
()
mtab
:=
newMockRoutingTable
()
makeRouting
:=
func
(
h
host
.
Host
)
(
config
.
Routing
,
error
)
{
makeRouting
:=
func
(
h
host
.
Host
)
(
libp2p
.
Basic
Routing
,
error
)
{
mr
:=
newMockRouting
(
h
,
mtab
)
return
mr
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment