code: func (server *Server) RegisterTask(name string, taskFunc interface{}) error {
  	if err := tasks.ValidateTask(taskFunc); err != nil {
  		return err
  	}
  	server.registeredTasks[name] = taskFunc
  	server.broker.SetRegisteredTaskNames(server.GetRegisteredTaskNames())
  	return nil
  }
docs: // RegisterTask registers a single task