Exemplo n.º 1
0
func (edriver *ExecutorDriver) Stop() error {
	if edriver.driver != nil {
		C.executor_stop(C.ExecutorDriverPtr(edriver.driver))
	} else {
		return errors.New("Stop() failed: executor driver not initialized")
	}
	return nil
}
Exemplo n.º 2
0
func (edriver *ExecutorDriver) SendFrameworkMessage(message string) error {
	if edriver.driver != nil {
		var cdata *C.char = C.CString(message)

		C.executor_sendFrameworkMessage(C.ExecutorDriverPtr(edriver.driver), cdata)
	} else {
		return errors.New(
			"SendFrameworkMessage() failed: executor driver not initialized")
	}

	return nil
}
Exemplo n.º 3
0
func (edriver *ExecutorDriver) SendStatusUpdate(status *TaskStatus) error {
	if edriver.driver != nil {
		statusObj, err := serialize(status)
		if err != nil {
			return err
		}

		C.executor_sendStatusUpdate(
			C.ExecutorDriverPtr(edriver.driver),
			&statusObj)
	} else {
		return errors.New(
			"sendStatusUpdate() failed: executor driver not initialized")
	}

	return nil
}