Skip to content

Commit

Permalink
Control visibility of IRateLimiter components
Browse files Browse the repository at this point in the history
  • Loading branch information
reisenberger committed Jul 16, 2019
1 parent db47862 commit daa42cb
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Polly.Specs.Helpers.RateLimit
{
public static class IRateLimiterExtensions
internal static class IRateLimiterExtensions
{
public static void ShouldPermitAnExecution(this IRateLimiter rateLimiter)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Polly.Specs.RateLimit
{
public class LockBasedTokenBucketRateLimiterTests : TokenBucketRateLimiterTestsBase
{
public override IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity)
internal override IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity)
=> new LockBasedTokenBucketRateLimiter(onePer, bucketCapacity);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Polly.Specs.RateLimit
{
public class LockFreeTokenBucketRateLimiterTests : TokenBucketRateLimiterTestsBase
{
public override IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity)
internal override IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity)
=> new LockFreeTokenBucketRateLimiter(onePer, bucketCapacity);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Polly.Specs.RateLimit
[Collection(Polly.Specs.Helpers.Constants.SystemClockDependentTestCollection)]
public abstract class TokenBucketRateLimiterTestsBase : RateLimitSpecsBase, IDisposable
{
public abstract IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity);
internal abstract IRateLimiter GetRateLimiter(TimeSpan onePer, long bucketCapacity);

public void Dispose()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Polly/RateLimit/IRateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Polly.RateLimit
/// <summary>
/// Defines methods to be provided by a rate-limiter used in a Polly <see cref="IRateLimitPolicy"/>
/// </summary>
public interface IRateLimiter
internal interface IRateLimiter
{
/// <summary>
/// Returns whether the execution is permitted; if not, returns what <see cref="TimeSpan"/> should be waited before retrying.
Expand Down
2 changes: 1 addition & 1 deletion src/Polly/RateLimit/LockBasedTokenBucketRateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Polly.RateLimit
/// <summary>
/// A lock-based token-bucket rate-limiter for a Polly <see cref="IRateLimitPolicy"/>.
/// </summary>
public class LockBasedTokenBucketRateLimiter : IRateLimiter
internal class LockBasedTokenBucketRateLimiter : IRateLimiter
{
private readonly long addTokenTickInterval;
private readonly long bucketCapacity;
Expand Down
2 changes: 1 addition & 1 deletion src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Polly.RateLimit
/// <summary>
/// A lock-free token-bucket rate-limiter for a Polly <see cref="IRateLimitPolicy"/>.
/// </summary>
public class LockFreeTokenBucketRateLimiter : IRateLimiter
internal class LockFreeTokenBucketRateLimiter : IRateLimiter
{
private readonly long addTokenTickInterval;
private readonly long bucketCapacity;
Expand Down

0 comments on commit daa42cb

Please sign in to comment.