function _buildChain(interceptors, options) {
  var next = function(interceptors) {
    if (interceptors.length === 0) {
      return function (options) {};
    }
    var head_interceptor = interceptors[0];
    var rest_interceptors = interceptors.slice(1);
    return function (options) {
      return head_interceptor(options, next(rest_interceptors));
    };
  };
  var chain = next(interceptors)(options);
  return new InterceptingCall(chain);
}
function _buildChain(interceptors, options) {
  var next = function(interceptors) {
    if (interceptors.length === 0) {
      return function (options) {};
    }
    var head_interceptor = interceptors[0];
    var rest_interceptors = interceptors.slice(1);
    return function (options) {
      return head_interceptor(options, next(rest_interceptors));
    };
  };
  var chain = next(interceptors)(options);
  return new InterceptingCall(chain);
}
function _buildChain ( interceptors , options ) { var next = function ( interceptors ) { if ( interceptors . length === 0 ) { return function ( options ) { } ; } var head_interceptor = interceptors [ 0 ] ; var rest_interceptors = interceptors . slice ( 1 ) ; return function ( options ) { return head_interceptor ( options , next ( rest_interceptors ) ) ; } ; } ; var chain = next ( interceptors ) ( options ) ; return new InterceptingCall ( chain ) ; }
Chain a list of interceptors together and return the first InterceptingCall.
@private
@param {Interceptor[]} interceptors An interceptor stack.
@param {grpc.Client~CallOptions} options Call options.
@return {InterceptingCall}
Chain a list of interceptors together and return the first InterceptingCall .
Build a chain of interceptors