// ClearEmergency provides a mock function with given fields: serviceID
548821
func (_m *ClientInterface) ClearEmergency(serviceID string) (int, error) {
	ret := _m.Called(serviceID)

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

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

	return r0, r1
}
751815
func (model Model) ClearPolicy() {
	for _, ast := range model["p"] {
		ast.Policy = nil
	}

	for _, ast := range model["g"] {
		ast.Policy = nil
	}
}
1342371
func (dr *delRange) clear() {
	logutil.Logger(ddlLogCtx).Info("[ddl] closing delRange")
	close(dr.quitCh)
	dr.wait.Wait()
}
1202008
func (lr *logRegistry) ClearRegistry() {
	var wasErr error

	// range over logger map and store keys
	lr.loggers.Range(func(k, v interface{}) bool {
		key, ok := k.(string)
		if !ok {
			wasErr = fmt.Errorf("cannot cast log map key to string")
			// false stops the iteration
			return false
		}
		if key != DefaultLoggerName {
			lr.loggers.Delete(key)
		}
		return true
	})

	if wasErr != nil {
		panic(wasErr)
	}
}
94174
func (rl *ReqLog) ClearInactive() {
	rl.lock.Lock()
	defer rl.lock.Unlock()

	k := rl.keep
	rl.keep = 0
	rl.cleanup()
	rl.keep = k
}
3269
func (s *StanServer) clearSentAndAck(sub *subState) {
	sr := s.ssarepl
	sr.waiting.Delete(sub)
	sr.ready.Delete(sub)
	sub.replicate = nil
}
1066693
func (r *Supervisor) ClearServiceHistory(serviceID string) {
	r.mu.Lock()
	delete(r.historyByService, serviceID)
	r.mu.Unlock()
}
1293177
func (p *Process) ClearCheckpoint(id int) error {
	if p.tracedir == "" {
		return proc.ErrNotRecorded
	}
	resp, err := p.conn.qRRCmd("delete checkpoint", strconv.Itoa(id))
	if err != nil {
		return err
	}
	if !strings.HasPrefix(resp, deleteCheckpointPrefix) {
		return errors.New(resp)
	}
	return nil
}
965245
func (e *SyncedEnforcer) ClearPolicy() {
	e.m.Lock()
	defer e.m.Unlock()
	e.Enforcer.ClearPolicy()
}
1327721
func (f *Facade) ClearEmergencyStopFlag(ctx datastore.Context, serviceID string) (int, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.ClearEmergencyStopFlag"))
	alog := f.auditLogger.Message(ctx, "Clearing Emergency Stop Flag").
		Action(audit.Update).ID(serviceID).Type(service.GetType())
	tenantID, err := f.GetTenantID(ctx, serviceID)
	if err != nil {
		return 0, alog.Error(err)
	}
	alog = alog.WithField("tenantid", tenantID)
	mutex := getTenantLock(tenantID)
	mutex.RLock()
	defer mutex.RUnlock()
	cleared, err := f.clearEmergencyStopFlag(ctx, tenantID, serviceID)
	return cleared, alog.Error(err)
}
211532
func (kva *KvAlert) Clear(resourceType api.ResourceType, alertID int64, ttl uint64) error {
	return kva.clear(resourceType, alertID, ttl)
}
489616
func (c *Conn) ClearCache(clearId bool, clearBloom bool, args map[string]interface{}, indices ...string) (ExtendedStatus, error) {
	var retval ExtendedStatus
	var clearCacheUrl string
	if len(indices) > 0 {
		clearCacheUrl = fmt.Sprintf("/%s/_cache/clear", strings.Join(indices, ","))

	} else {
		clearCacheUrl = fmt.Sprintf("/_cache/clear")
	}

	body, err := c.DoCommand("POST", clearCacheUrl, args, nil)
	if err != nil {
		return retval, err
	}
	if err == nil {
		// marshall into json
		jsonErr := json.Unmarshal(body, &retval)
		if jsonErr != nil {
			return retval, jsonErr
		}
	}
	return retval, err
}
714441
func (r *RegisterMonitor) serviceID() string {
	id := fmt.Sprintf("%s-proxy", r.Service)
	if r.IDSuffix != "" {
		id += "-" + r.IDSuffix
	}

	return id
}
1196954
func (d *Debugger) ClearCheckpoint(id int) error {
	d.processMutex.Lock()
	defer d.processMutex.Unlock()
	return d.target.ClearCheckpoint(id)
}
380993
func (e *Endpoint) cleanPolicySignals() {
	now := time.Now()
	for w := range e.policyRevisionSignals {
		w.done(now)
		close(w.ch)
	}
	e.policyRevisionSignals = map[*policySignal]bool{}
}
1122059
func (ml *MemoryLogger) Clear() {
	ml.mu.Lock()
	ml.Events = nil
	ml.mu.Unlock()
}
745769
func (s *Settings) ClearOnChange(key string) {
	s.lock.Lock()
	defer s.lock.Unlock()
	delete(s.onChangeCallbacks, key)
}