add the ability to provide seed nodes to the network
This commit is contained in:
@@ -20,6 +20,8 @@ type Options struct {
|
||||
Name string
|
||||
// Address to bind to
|
||||
Address string
|
||||
// Nodes is a list of seed nodes
|
||||
Nodes []string
|
||||
// Tunnel is network tunnel
|
||||
Tunnel tunnel.Tunnel
|
||||
// Router is network router
|
||||
@@ -51,6 +53,14 @@ func Address(a string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// Nodes is a list of seed nodes used along
|
||||
// with resolved node
|
||||
func Nodes(n ...string) Option {
|
||||
return func(o *Options) {
|
||||
o.Nodes = n
|
||||
}
|
||||
}
|
||||
|
||||
// Tunnel sets the network tunnel
|
||||
func Tunnel(t tunnel.Tunnel) Option {
|
||||
return func(o *Options) {
|
||||
|
Reference in New Issue
Block a user