Exemplo n.º 1
0
 /// <summary>
 /// Reset the rate limiter instance to null.  This will allow a new QPS rate limit to
 /// be set.  For testing use only.
 /// </summary>
 internal static void Reset() => _instance = null;
Exemplo n.º 2
0
 private RateLimitingTraceOptionsFactory(TraceConfiguration config)
 {
     GaxPreconditions.CheckNotNull(config, nameof(config));
     _rateLimiter = RateLimiter.GetInstance(config.QpsSampleRate);
 }
Exemplo n.º 3
0
 internal RateLimitingTraceOptionsFactory(RateLimiter rateLimiter)
 {
     _rateLimiter = GaxPreconditions.CheckNotNull(rateLimiter, nameof(rateLimiter));
 }
 private RateLimitingTraceOptionsFactory(TraceOptions options)
 {
     GaxPreconditions.CheckNotNull(options, nameof(options));
     _rateLimiter = RateLimiter.GetInstance(options.QpsSampleRate);
 }