// ExecutionFromID produces an empty Execution model from the ExecutionID.
502806
func ExecutionFromID(c context.Context, eid *dm.Execution_ID) *Execution {
	ret := &Execution{}
	ret.ID = invertedHexUint32(eid.Id)
	ret.Attempt = AttemptKeyFromID(c, eid.AttemptID())
	return ret
}
455677
func (i *InstructionWriteActions) ReadFrom(r io.Reader) (int64, error) {
	return readInstructionActions(r, &i.Actions)
}
620159
func (kern *Kernel) LoadExecutionOptionsFromConfig(conf *execution.ExecutionConfig) error {
	if conf != nil {
		exeOptions, err := conf.ExecutionOptions()
		if err != nil {
			return err
		}
		kern.exeOptions = exeOptions
		kern.timeoutFactor = conf.TimeoutFactor
	}
	return nil
}
755584
func NewExecutionFinished(result *JsonResult) *Execution {
	return &Execution{
		Data: &Execution_Data{
			ExecutionType: &Execution_Data_Finished_{
				&Execution_Data_Finished{Data: result}}}}
}
625763
func (wfc *WorkflowController) executorImage() string {
	if wfc.cliExecutorImage != "" {
		return wfc.cliExecutorImage
	}
	return wfc.Config.ExecutorImage
}
434936
func ExecPipeToFds(fds Fds, program string, args ...string) error {
	log.Printf("+++ invoke: %s %v", program, args)
	defer log.Printf("--- invoke end")
	cmd := osexec.Command(program, args...)

	// replace nil streams with default
	if fds.Out == nil {
		fds.Out = out
	}
	if fds.Err == nil {
		fds.Err = out
	}

	cmd.Stdout, cmd.Stderr = fds.Out, fds.Err
	err := cmd.Run()
	if err != nil {
		err = fmt.Errorf("executing %s %v failed: %v", program, args, err)
	}
	return err
}
688425
func (c *Client) GetExecutorByID(executor []Executor, executorID string) (*Executor, error) {
	for _, e := range executor {
		if e.ID == executorID {
			return &e, nil
		}
	}

	return nil, fmt.Errorf("No executor found with id \"%s\"", executorID)
}
590256
func (s *FunctionDefaultConfig) SetExecution(v *FunctionDefaultExecutionConfig) *FunctionDefaultConfig {
	s.Execution = v
	return s
}
1347849
func ExecPipe(program string, args ...string) error {
	return ExecPipeToFds(Fds{out, out}, program, args...)
}
1152331
func (adm AdminClient) executeMethod(method string, reqData requestData) (res *http.Response, err error) {

	// Create a done channel to control 'ListObjects' go routine.
	doneCh := make(chan struct{}, 1)

	// Indicate to our routine to exit cleanly upon return.
	defer close(doneCh)

	// Instantiate a new request.
	var req *http.Request
	req, err = adm.newRequest(method, reqData)
	if err != nil {
		return nil, err
	}

	// Initiate the request.
	res, err = adm.do(req)
	if err != nil {
		return nil, err
	}

	// For any known successful http status, return quickly.
	for _, httpStatus := range successStatus {
		if httpStatus == res.StatusCode {
			return res, nil
		}
	}

	// Read the body to be saved later.
	errBodyBytes, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, err
	}
	// Save the body.
	errBodySeeker := bytes.NewReader(errBodyBytes)
	res.Body = ioutil.NopCloser(errBodySeeker)

	// Save the body back again.
	errBodySeeker.Seek(0, 0) // Seek back to starting point.
	res.Body = ioutil.NopCloser(errBodySeeker)

	return res, err
}
706436
func (_m *API) ExecExitCode(ctx context.Context, execID string) (int, error) {
	ret := _m.Called(ctx, execID)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, string) int); ok {
		r0 = rf(ctx, execID)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, execID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
184568
func (_m *API) ExecCreate(ctx context.Context, target string, config *types.ExecConfig) (string, error) {
	ret := _m.Called(ctx, target, config)

	var r0 string
	if rf, ok := ret.Get(0).(func(context.Context, string, *types.ExecConfig) string); ok {
		r0 = rf(ctx, target, config)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, *types.ExecConfig) error); ok {
		r1 = rf(ctx, target, config)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
457567
func (s *StackSet) SetExecutionRoleName(v string) *StackSet {
	s.ExecutionRoleName = &v
	return s
}
1155656
func (s *ListOpenWorkflowExecutionsInput) SetExecutionFilter(v *WorkflowExecutionFilter) *ListOpenWorkflowExecutionsInput {
	s.ExecutionFilter = v
	return s
}
738896
func (a *AddBindingArgs) SetExecutionContextID(executionContextID ExecutionContextID) *AddBindingArgs {
	a.ExecutionContextID = &executionContextID
	return a
}
387550
func NewExecutionID(qst string, aid, eid uint32) *Execution_ID {
	return &Execution_ID{Quest: qst, Attempt: aid, Id: eid}
}
875294
func (r *runtimeVerbose) InitFromMain() {
	initRuntimeVMutex.Lock()
	if r.hasInit == false {
		r.Init(mainPath)
	}
	initRuntimeVMutex.Unlock()
}