code: func (p *Processor) TerminateChannel(id, jobCreator string,
  	agent bool) (string, error) {
  	var jobType string
  	if agent {
  		jobType = data.JobAgentPreServiceTerminate
  	} else {
  		jobType = data.JobClientPreServiceTerminate
  	}
  
  	return p.alterServiceStatus(id, jobCreator,
  		jobType, jobType, terminateTransitions, true)
  }
docs: // TerminateChannel tries to terminate a given channel.