canRequest(endpoint) {
    if (!this.states[endpoint]) this.initState(endpoint);
    const state = this.states[endpoint];
    if (state.circuit === 'CLOSED') return true;
    const now = new Date() / 1000;
    if (state.nextTry <= now) {
      state.circuit = 'HALF';
      return true;
    }
    return false;
  }
/**
   * @param  {string} endpoint
   * @return {boolean} true if circuit is closed or half open, false otherwise
   */
@param  {string} endpoint
@return {boolean} true if circuit is closed or half open, false otherwise
@param { string } endpoint @return { boolean } true if circuit is closed or half open false otherwise
canRequest(endpoint) {
    if (!this.states[endpoint]) this.initState(endpoint);
    const state = this.states[endpoint];
    if (state.circuit === 'CLOSED') return true;
    const now = new Date() / 1000;
    if (state.nextTry <= now) {
      state.circuit = 'HALF';
      return true;
    }
    return false;
  }
canRequest ( endpoint ) { if ( ! this . states [ endpoint ] ) this . initState ( endpoint ) ; const state = this . states [ endpoint ] ; if ( state . circuit === 'CLOSED' ) return true ; const now = new Date ( ) / 1000 ; if ( state . nextTry <= now ) { state . circuit = 'HALF' ; return true ; } return false ; }
@param  {string} endpoint
 @return {boolean} true if circuit is closed or half open, false otherwise
@param { string } endpoint @return { boolean } true if circuit is closed or half open false otherwise