code: function RateLimit(type, distFactor, config) {
    this.config = config;
    this.type = type;
    this.buckets = this.config.defaultBuckets.map(b => new TokenBucket(b.timespan, b.limit, b));
    this.retryAfter = 0;
    this.distFactor = distFactor;
  }
docs: Rate limit. A collection of token buckets, updated when needed.