4using Microsoft.Extensions.Logging;
33 public string Secret {
get; init; } = Environment.GetEnvironmentVariable(
"FAUNA_SECRET") ??
string.Empty;
38 public Uri
Endpoint {
get; init; } = Endpoints.GetFaunaEndpoint();
64 if (!
string.IsNullOrEmpty(secret))
69 if (httpClient !=
null)
81 Logger.Initialize(logger);
85 internal void Validate()
87 if (
string.IsNullOrEmpty(
Secret))
88 throw new ArgumentNullException(
90 "Need to set FAUNA_SECRET environment variable or pass a secret as a parameter when creating the Client."
Configuration is a class used to configure a Fauna Client. It encapsulates various settings such as t...
HttpClient HttpClient
The HTTP Client to use for requests.
Uri Endpoint
The endpoint URL of the Fauna server.
string Secret
The secret key used for authentication.
bool DisposeHttpClient
Whether the Client should dispose of the HttpClient on Dispose.
Configuration(string secret="", HttpClient? httpClient=null, ILogger? logger=null)
Initializes a new instance of the Configuration record with the specified secret key.
TimeSpan ClientBufferTimeout
Additional buffer to add to QueryOptions.QueryTimeout when setting the HTTP request timeout on the Ht...
IStatsCollector? StatsCollector
StatsCollector for the client.
QueryOptions DefaultQueryOptions
Default options for queries sent to Fauna.
Represents the options for customizing Fauna queries.
A class representing a retry configuration for queries.
The default implementation of IStatsCollector.
An interface used by a client instance for aggregating stats across all queries.