cmd: New reload command

This commit is contained in:
Matthew Holt
2019-07-05 09:59:13 -06:00
parent 6bcba91fbe
commit 9429c843c8
3 changed files with 64 additions and 2 deletions

View File

@ -44,7 +44,7 @@ type AdminConfig struct {
// DefaultAdminConfig is the default configuration
// for the administration endpoint.
var DefaultAdminConfig = &AdminConfig{
Listen: "localhost:2019",
Listen: DefaultAdminListen,
}
// StartAdmin starts Caddy's administration endpoint,
@ -192,6 +192,10 @@ func Load(r io.Reader) error {
return nil
}
// DefaultAdminListen is the address for the admin
// listener, if none is specified at startup.
var DefaultAdminListen = "localhost:2019"
var bufPool = sync.Pool{
New: func() interface{} {
return new(bytes.Buffer)