func (d *Daemon) Shutdown() {
	if d.g != nil {
		d.g.Shutdown()
	}
}
Shuts down the daemon, including servers and backend.
Do not call Start on it again, use a new server.
package guerrilla
import (
	"encoding/json"
	"errors"
	"fmt"
	"github.com/flashmob/go-guerrilla/backends"
	"github.com/flashmob/go-guerrilla/log"
	"io/ioutil"
	"time"
)
type Daemon struct {
	Config  *AppConfig
	Logger  log.Logger
	Backend backends.Backend
	g Guerrilla
	configLoadTime time.Time
	subs           []deferredSub
}
type deferredSub struct {
	topic Event
	fn    interface{}
}
func (d *Daemon) AddProcessor(name string, pc backends.ProcessorConstructor) {
	backends.Svc.AddProcessor(name, pc)
}
func (d *Daemon) Start() (err error) {
	if d.g == nil {
		if d.Config == nil {
			d.Config = &AppConfig{}
		}
		if err = d.configureDefaults(); err != nil {
			return err
		}
		if d.Logger == nil {
			d.Logger, err = log.GetLogger(d.Config.LogFile, d.Config.LogLevel)
			if err != nil {
				return err
			}
		}
		if d.Backend == nil {
			d.Backend, err = backends.New(d.Config.BackendConfig, d.Logger)
			if err != nil {
				return err
			}
		}
		d.g, err = New(d.Config, d.Backend, d.Logger)
		if err != nil {
			return err
		}
		for i := range d.subs {
			_ = d.Subscribe(d.subs[i].topic, d.subs[i].fn)
		}
		d.subs = make([]deferredSub, 0)
	}
	err = d.g.Start()
	if err == nil {
		if err := d.resetLogger(); err == nil {
			d.Log().Infof("main log configured to %s", d.Config.LogFile)
		}
	}
	return err
}