Table of Contents

Method Create

Namespace
MailFathom.Application.Emails.Embeddings.Limits
Assembly
MailFathom.Application.dll

Create(int, TimeProvider)

Builds a pacer from the rate a deployment declared.

public static EmbeddingRequestPacer Create(int maxRequestsPerMinute, TimeProvider timeProvider)

Parameters

maxRequestsPerMinute int

The requests one minute may carry, or zero to pace nothing.

timeProvider TimeProvider

Measures the waits and decides when a slot has arrived.

Returns

EmbeddingRequestPacer

The pacer.

Exceptions

ArgumentNullException

Thrown when timeProvider is null.

ArgumentOutOfRangeException

Thrown when the rate is negative.