// abortInvocation marks some invocation as aborted.
970551
func (e *engineImpl) abortInvocation(c context.Context, jobID string, invID int64) error {
	return e.withController(c, jobID, invID, "manual abort", func(c context.Context, ctl *taskController) error {
		ctl.DebugLog("Invocation is manually aborted by %s", auth.CurrentIdentity(c))

		switch err := ctl.manager.AbortTask(c, ctl); {
		case transient.Tag.In(err):
			return err // ask for retry on transient errors, don't touch Invocation
		case err != nil:
			ctl.DebugLog("Fatal error when aborting the invocation - %s", err)
		}

		// On success or on a fatal error mark the task as aborted (unless the
		// manager already switched the state). We can't do anything about the
		// failed abort attempt anyway.
		if !ctl.State().Status.Final() {
			ctl.State().Status = task.StatusAborted
		}
		return nil
	})
}
52093
func (ie *InitEvent) call() {
	log.Debug("OnInit callbacks executing")
	defer log.Debug("OnInit callbacks finished")
	for _, ev := range *ie {
		ev()
	}
}
525950
func (s *PutBotInput) SetAbortStatement(v *Statement) *PutBotInput {
	s.AbortStatement = v
	return s
}
460247
func (driver *MesosSchedulerDriver) abort(ctx context.Context, cause error) (stat mesos.Status, err error) {
	if driver.masterDetector != nil {
		defer driver.masterDetector.Cancel()
	}

	log.Infof("Aborting framework [%+v]", driver.frameworkInfo.Id)

	if driver.connected {
		_, err = driver.stop(ctx, cause, true)
	} else {
		driver._stop(cause, mesos.Status_DRIVER_ABORTED)
	}

	stat = mesos.Status_DRIVER_ABORTED
	driver.status = stat
	return
}
283382
func getNonRevocationProver(algorithm RevocationAlgorithm) (nonRevokedProver, error) {
	switch algorithm {
	case ALG_NO_REVOCATION:
		return &nopNonRevokedProver{}, nil
	default:
		// unknown revocation algorithm
		return nil, errors.Errorf("unknown revocation algorithm %d", algorithm)
	}
}
1324368
func (e *Invocation) debugLog(c context.Context, format string, args ...interface{}) {
	debugLog(c, &e.DebugLog, format, args...)
}
1300422
func (mr *MockContextMockRecorder) Abort() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockContext)(nil).Abort))
}
97487
func (c check) invoke(ch chan<- check) error {
	for {
		select {
		case <-c.stop:
			return errStopped
		case ch <- c:
			ch = nil
		case err := <-c.response:
			return errors.Trace(err)
		}
	}
}
1341080
func Abort(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "abort", Listener: listener}
}
493673
func (app *App) executeInvokes() error {
	// TODO: consider taking a context to limit the time spent running invocations.
	var err error

	for _, fn := range app.invokes {
		fname := fxreflect.FuncName(fn)
		app.logger.Printf("INVOKE\t\t%s", fname)

		if _, ok := fn.(Option); ok {
			err = fmt.Errorf("fx.Option should be passed to fx.New directly, not to fx.Invoke: fx.Invoke received %v", fn)
		} else {
			err = app.container.Invoke(fn)
		}

		if err != nil {
			app.logger.Printf("Error during %q invoke: %v", fname, err)
			break
		}
	}

	return err
}
248111
func (c Core) AbortMultipartUpload(bucket, object, uploadID string) error {
	return c.abortMultipartUpload(context.Background(), bucket, object, uploadID)
}
682002
func (s *Stream) Abort() error {
	if s.pmStream == nil {
		return nil
	}
	return convertToError(C.Pm_Abort(unsafe.Pointer(s.pmStream)))
}
923077
func (e *engineImpl) GetInvocation(c context.Context, job *Job, invID int64) (*Invocation, error) {
	// Note: we want public API users to go through GetVisibleJob to check ACLs,
	// thus usage of *Job, even though JobID string is sufficient in this case.
	return e.getInvocation(c, job.JobID, invID)
}
659744
func (ctx *Context) Abort(statusCode int, data ...map[string]interface{}) {
	ctx.App.handleError(ctx, statusCode, data...)
}
1150984
func abortInvocationAction(c *router.Context) {
	handleInvAction(c, func(job *engine.Job, invID int64) error {
		return config(c.Context).Engine.AbortInvocation(c.Context, job, invID)
	})
}
602374
func (ln *line) isMixinInvocation() bool {
	if ln.isTopIndent() {
		return false
	}

	_, _, err := mixinNP(ln, false)

	return err == nil
}
327320
func (rc *RemoteContext) Abort() {
	rc.streamsByID.Range(func(_, value interface{}) bool {
		value.(*Stream).Cancel(errAborted)
		return false
	})
}