Class QuotaMiddleware
- Namespace
 - FoundationaLLM.Common.Middleware
 
- Assembly
 - FoundationaLLM.Common.dll
 
Middleware that enforces API request quotas.
public class QuotaMiddleware
  - Inheritance
 - 
      
      QuotaMiddleware
 
- Inherited Members
 
- Extension Methods
 
Constructors
QuotaMiddleware(RequestDelegate)
Initializes a new instance of the CallContextMiddleware class.
public QuotaMiddleware(RequestDelegate next)
  Parameters
nextRequestDelegate
Methods
InvokeAsync(HttpContext, IOrchestrationContext, IQuotaService, IOptions<InstanceSettings>)
Executes the middleware.
public Task InvokeAsync(HttpContext context, IOrchestrationContext callContext, IQuotaService quotaService, IOptions<InstanceSettings> instanceSettings)
  Parameters
contextHttpContextThe current HTTP request context.
callContextIOrchestrationContextStores context information extracted from the current HTTP request. This information is primarily used to inject HTTP headers into downstream HTTP calls.
quotaServiceIQuotaServiceProvides services for managing quotas.
instanceSettingsIOptions<InstanceSettings>Contains the FoundationaLLM instance configuration settings.