mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Remove config.NodeState (hot reconfig is no longer supported)
This commit is contained in:
parent
978124dbb1
commit
166336a418
10 changed files with 63 additions and 102 deletions
|
@ -63,12 +63,13 @@ func (a *AdminSocket) AddHandler(name string, args []string, handlerfunc func(js
|
|||
}
|
||||
|
||||
// Init runs the initial admin setup.
|
||||
func (a *AdminSocket) Init(c *core.Core, state *config.NodeState, log *log.Logger, options interface{}) error {
|
||||
func (a *AdminSocket) Init(c *core.Core, nc *config.NodeConfig, log *log.Logger, options interface{}) error {
|
||||
a.core = c
|
||||
a.log = log
|
||||
a.handlers = make(map[string]handler)
|
||||
current := state.GetCurrent()
|
||||
a.listenaddr = current.AdminListen
|
||||
nc.RLock()
|
||||
a.listenaddr = nc.AdminListen
|
||||
nc.RUnlock()
|
||||
a.done = make(chan struct{})
|
||||
close(a.done) // Start in a done / not-started state
|
||||
_ = a.AddHandler("list", []string{}, func(_ json.RawMessage) (interface{}, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue