src/middlewares/circuit-breaker.js
function resetStore() {
		if (!logger) return;

		logger.debug("Reset circuit-breaker endpoint states...");
		store.forEach((item, key) => {
			if (item.count == 0) {
				logger.debug(`Remove '${key}' endpoint state because it is not used`);
				store.delete(key);
				return;
			}

			logger.debug(`Clean '${key}' endpoint state.`);
			item.count = 0;
			item.failures = 0;
		});
	}
function resetStore() {
		if (!logger) return;

		logger.debug("Reset circuit-breaker endpoint states...");
		store.forEach((item, key) => {
			if (item.count == 0) {
				logger.debug(`Remove '${key}' endpoint state because it is not used`);
				store.delete(key);
				return;
			}

			logger.debug(`Clean '${key}' endpoint state.`);
			item.count = 0;
			item.failures = 0;
		});
	}
function resetStore ( ) { if ( ! logger ) return ; logger . debug ( "Reset circuit-breaker endpoint states..." ) ; store . forEach ( ( item , key ) => { if ( item . count == 0 ) { logger . debug ( ` ${ key } ` ) ; store . delete ( key ) ; return ; } logger . debug ( ` ${ key } ` ) ; item . count = 0 ; item . failures = 0 ; } ) ; }
Clear endpoint state store
Clear endpoint state store