Replace caddyfile parser with custom one

Reasons are explained here:
https://github.com/emersion/maddy/issues/15#issuecomment-473340377
This commit is contained in:
fox.cpp 2019-03-18 17:36:21 +03:00 committed by emersion
parent 5315e16873
commit 1a738d1111
9 changed files with 346 additions and 164 deletions

View file

@ -17,7 +17,7 @@ package module
import (
"sync"
"github.com/mholt/caddy/caddyfile"
"github.com/emersion/maddy/config"
)
// Module is the interface implemented by all maddy module instances.
@ -37,7 +37,7 @@ type Module interface {
}
// NewModule is function that creates new instance of module with specified name.
type NewModule func(name string, cfg map[string][]caddyfile.Token) (Module, error)
type NewModule func(name string, cfg config.CfgTreeNode) (Module, error)
// Global WaitGroup instance is used to ensure graceful shutdown of server.
// Whenever module starts goroutine (except when it is short-lived) - it should