Add options to set ports on weaver command line
This commit adds two command line options, intended to allow multiple instances of weave to run without container separation between them. * -port=PORT makes weave bind to port PORT (an integer). Without the option, the default value (6783) is used. * -httpaddr=ADDRESS makes weave bind its control interface to a different address. For instance "127.0.0.1:6784" can be used to bind to localhost only. An absent address element makes it bind to all interfaces. ":6784" is the default. An empty string can be used to disable the control interface. Signed-off-by: Alex Bligh <alex@alex.org.uk>
This commit is contained in:
1 parent
bb9e26b4ae
commit
12d88eac23
7 files changed
+49
-40
No files matched your search
@@ -17,7 +17,7 @@ type mockChannelConnection struct {
|
||||
// Construct a "passive" Router, i.e. without any goroutines, except
|
||||
// for Routes and GossipSenders.
|
||||
func NewTestRouter(name PeerName) *Router {
|
||||
router := NewRouter(nil, name, "", nil, 10, 1024, nil)
|
||||
router := NewRouter(nil, name, "", nil, 10, 1024, nil, Port)
|
||||
// need to create a dummy channel otherwise tests hang on nil
|
||||
// channels when the Router invoked ConnectionMaker.Refresh
|
||||
router.ConnectionMaker.actionChan = make(chan ConnectionMakerAction, ChannelSize)
|
||||
|
||||
Reference in new issue
Block a user