code: func (e *engineImpl) EmitTriggers(c context.Context, perJob map[*Job][]*internal.Trigger) error {
  	// Make sure the caller has permissions to add triggers to all jobs.
  	jobs := make([]*Job, 0, len(perJob))
  	for j := range perJob {
  		jobs = append(jobs, j)
  	}
  	switch filtered, err := e.filterForRole(c, jobs, acl.Triggerer); {
  	case err != nil:
  		return errors.Annotate(err, "transient error when checking Triggerer role").Err()
  	case len(filtered) != len(jobs):
  		return ErrNoPermission // some jobs are not triggerable
  	}
  
  	// Actually trigger.
  	return parallel.FanOutIn(func(tasks chan<- func() error) {
  		for job, triggers := range perJob {
  			jobID := job.JobID
  			triggers := triggers
  			tasks <- func() error {
  				return e.execEnqueueTriggersTask(c, &internal.EnqueueTriggersTask{
  					JobId:    jobID,
  					Triggers: triggers,
  				})
  			}
  		}
  	})
  }
docs: // EmitTriggers puts one or more triggers into pending trigger queues of the
  // specified jobs.