src/middlewares/circuit-breaker.js
function getEpState(ep, opts) {
		let item = store.get(ep.name);
		if (!item) {
			item = {
				ep,
				opts,
				count: 0,
				failures: 0,
				state: C.CIRCUIT_CLOSE,
				cbTimer: null
			};
			store.set(ep.name, item);
		}
		return item;
	}
function getEpState(ep, opts) {
		let item = store.get(ep.name);
		if (!item) {
			item = {
				ep,
				opts,
				count: 0,
				failures: 0,
				state: C.CIRCUIT_CLOSE,
				cbTimer: null
			};
			store.set(ep.name, item);
		}
		return item;
	}
function getEpState ( ep , opts ) { let item = store . get ( ep . name ) ; if ( ! item ) { item = { ep , opts , count : 0 , failures : 0 , state : C . CIRCUIT_CLOSE , cbTimer : null } ; store . set ( ep . name , item ) ; } return item ; }
Get Endpoint state from store. If not exists, create it.

@param {Endpoint} ep
@param {Object} opts
@returns {Object}
Get Endpoint state from store . If not exists create it .