proc/channel.go
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)
}
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)
}
// TerminateChannel tries to terminate a given channel.