// isRollbackEvent checks if the input event is about rollback, and returns true and
// related result string back if it is.
323780
func isRollbackEvent(e *api.Event) (bool, string) {
	rollbackEventReasons := []string{deploymentutil.RollbackRevisionNotFound, deploymentutil.RollbackTemplateUnchanged, deploymentutil.RollbackDone}
	for _, reason := range rollbackEventReasons {
		if e.Reason == reason {
			if reason == deploymentutil.RollbackDone {
				return true, "rolled back"
			}
			return true, fmt.Sprintf("skipped rollback (%s: %s)", e.Reason, e.Message)
		}
	}
	return false, ""
}
690389
func IsPutEvent(event notify.Event) bool {
	for _, ev := range EventTypePut {
		if event&ev != 0 {
			return true
		}
	}
	return false
}
1248021
func ValidateEvent(eventCategory EventCategory, event Event) bool {
	valid := false
	switch eventCategory {
	case EventCategoryDefined:
		valid = int(event) >= 0 && event < EventDefinedLast
	case EventCategoryUndefined:
		valid = int(event) >= 0 && event < EventUndefinedLast
	case EventCategoryStarted:
		valid = int(event) >= 0 && event < EventStartedLast
	case EventCategorySuspended:
		valid = int(event) >= 0 && event < EventSuspendedLast
	case EventCategoryResumed:
		valid = int(event) >= 0 && event < EventResumedLast
	case EventCategoryStopped:
		valid = int(event) >= 0 && event < EventStoppedLast
	case EventCategoryShutdown:
		valid = int(event) >= 0 && event < EventShutdownLast
	case EventCategoryPmsuspended:
		valid = int(event) >= 0 && event < EventPMSuspendedLast
	}

	return valid
}
1149473
func IsRollingConfig(config *appsv1.DeploymentConfig) bool {
	return config.Spec.Strategy.Type == appsv1.DeploymentStrategyTypeRolling
}
10420
func BeginEvent(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "beginEvent", Listener: listener}
}
440106
func (s *Stack) SetRollbackConfiguration(v *RollbackConfiguration) *Stack {
	s.RollbackConfiguration = v
	return s
}
13152
func (k *KeyLogger) eventFromBuffer(buffer []byte) (*InputEvent, error) {
	event := &InputEvent{}
	err := binary.Read(bytes.NewBuffer(buffer), binary.LittleEndian, event)
	return event, err
}
189768
func (s *CreateStackInput) SetRollbackConfiguration(v *RollbackConfiguration) *CreateStackInput {
	s.RollbackConfiguration = v
	return s
}
315537
func (f EventHandlerFunc) HandleEvent(resp http.ResponseWriter, req *http.Request, event *Event) {
	f(resp, req, event)
}
281536
func (s *CreateCloudFormationChangeSetRequest) SetRollbackConfiguration(v *RollbackConfiguration) *CreateCloudFormationChangeSetRequest {
	s.RollbackConfiguration = v
	return s
}
315921
func (b *backend) ProcessEvents(events ...*auditinternal.Event) bool {
	for _, d := range b.GetDelegates() {
		d.ProcessEvents(events...)
	}
	// Returning true regardless of results, since dynamic audit backends
	// can never cause apiserver request to fail.
	return true
}
228902
func (session *Session) Rollback() error {
	if !session.isAutoCommit && !session.isCommitedOrRollbacked {
		session.saveLastSQL(session.engine.dialect.RollBackStr())
		session.isCommitedOrRollbacked = true
		session.isAutoCommit = true
		return session.tx.Rollback()
	}
	return nil
}
386021
func RollbackWait(wait bool) RollbackOption {
	return func(opts *options) {
		opts.rollbackReq.Wait = wait
	}
}
121062
func (h *handler) HandleEvent(ctx context.Context, event eh.Event) error {
	select {
	case h.ch <- event:
	default:
		return fmt.Errorf("missed event: %s", event)
	}
	return nil
}
1065728
func (t *Table) OnKeyEvent(ev KeyEvent) {
	if !t.IsFocused() {
		return
	}

	switch ev.Key {
	case KeyUp:
		t.moveUp()
	case KeyDown:
		t.moveDown()
	case KeyEnter:
		if t.onItemActivated != nil {
			t.onItemActivated(t)
		}
	}

	switch ev.Rune {
	case 'k':
		t.moveUp()
	case 'j':
		t.moveDown()
	}
}
555600
func (s *DeploymentInfo) SetRollbackInfo(v *RollbackInfo) *DeploymentInfo {
	s.RollbackInfo = v
	return s
}
1270516
func (c *Frame) HandleEvent(event termbox.Event) bool {
	if event.Key == termbox.KeyTab {
		c.FindNextTabStop()
		return true
	}
	return c.controls[c.tabIdx].HandleEvent(event)
}