Exemple #1
0
// Separated function, can be called from tests
func initServiceProvider() {
	sortedServices, err := gorivets.NewSortedSliceByComp(сompServicesF, 1)
	gorivets.AssertNoError(err)
	logger := log4g.GetLogger("spi.serviceProvider")
	sp = &serviceProvider{services: make(map[string]Service), sortedServices: sortedServices, state: INIT, logger: logger}
}
Exemple #2
0
func (wcb *wcBuilder) Build() WorkerController {
	gorivets.AssertNotNil(wcb.ip)
	gorivets.AssertNotNil(wcb.ap)
	gorivets.AssertNotNil(wcb.wp)
	return &workerController{wcb.ip, wcb.ap, wcb.wp, log4g.GetLogger("gazer.wc.WorkerController")}
}