Allowing Commands to reconfigure app Configuration, this is will allow default ports to be currently added to remote presets

This commit is contained in:
NI
2020-02-23 17:23:24 +08:00
parent 697ee0b2a1
commit e7ca6d95ed
14 changed files with 212 additions and 79 deletions

View File

@@ -21,5 +21,11 @@ import (
"github.com/niruix/sshwifty/application/log"
)
// Reconfigurator reloads configuration
type Reconfigurator func(p Configuration) Configuration
// Loader Configuration loader
type Loader func(log log.Logger) (name string, cfg Configuration, err error)
type Loader func(
log log.Logger,
r Reconfigurator,
) (name string, cfg Configuration, err error)