using System;

namespace StellaOps.Authority.RateLimiting;

/// <summary>
/// Feature carrying rate limiter metadata for the current HTTP request.
/// </summary>
internal sealed class AuthorityRateLimiterFeature : IAuthorityRateLimiterFeature
{
    public AuthorityRateLimiterFeature()
    {
        Metadata = new AuthorityRateLimiterMetadata();
    }

    public AuthorityRateLimiterFeature(AuthorityRateLimiterMetadata metadata)
    {
        Metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));
    }

    public AuthorityRateLimiterMetadata Metadata { get; }
}

internal interface IAuthorityRateLimiterFeature
{
    AuthorityRateLimiterMetadata Metadata { get; }
}
