add router selector and network defaults

This commit is contained in:
Asim Aslam
2019-06-26 16:12:57 +01:00
parent 1a62c11166
commit ac098e4d78
6 changed files with 292 additions and 2 deletions

View File

@@ -51,6 +51,25 @@ type Message struct {
}
var (
// TODO: set default network
DefaultNetwork Network
// The default network ID is local
DefaultNetworkId = "local"
// just the standard network element
DefaultNetwork = NewNetwork()
)
// NewNetwork returns a new network
func NewNetwork(opts ...options.Option) Network {
options := options.NewOptions(opts...)
// get router
// get proxy
return &network{
Options: options,
// fill the blanks
// router: r,
// proxy: p,
}
}