예제 #1
0
파일: proxy.go 프로젝트: nickwales/proxym
func init() {
	var c Config

	envconfig.Process("proxym_proxy", &c)

	if c.Enabled {
		cg := NewGenerator(&c)

		manager.AddConfigGenerator(cg)
	}
}
예제 #2
0
파일: hipache.go 프로젝트: nickwales/proxym
func init() {
	var c config

	envconfig.Process("proxym_hipache", &c)

	if c.Enabled {
		h, err := newHipache(&c)
		if err != nil {
			log.ErrorLog.Critical("Error initializing Hipache module: %s", err)
			return
		}

		manager.AddConfigGenerator(h)
	}
}