Example #1
0
func NewService(debug bool, registry kit.Registry) *Service {
	return &Service{
		debug:          debug,
		registry:       registry,
		defaultBackend: registry.DefaultBackend(),
		resources:      make(map[string]kit.Resource),
	}
}
Example #2
0
func (s *Service) SetRegistry(x kit.Registry) {
	s.registry = x
	if s.backend == nil && x.DefaultBackend() != nil {
		s.SetBackend(x.DefaultBackend())
	}
}