code: func (h *HandlerService) Register(comp component.Component, opts []component.Option) error {
  	s := component.NewService(comp, opts)
  
  	if _, ok := h.services[s.Name]; ok {
  		return fmt.Errorf("handler: service already defined: %s", s.Name)
  	}
  
  	if err := s.ExtractHandler(); err != nil {
  		return err
  	}
  
  	// register all handlers
  	h.services[s.Name] = s
  	for name, handler := range s.Handlers {
  		handlers[fmt.Sprintf("%s.%s", s.Name, name)] = handler
  	}
  	return nil
  }
docs: // Register registers components