Fauna v10 .NET/C# Driver 0.2.0-beta
 
Loading...
Searching...
No Matches
Configuration.cs
Go to the documentation of this file.
1namespace Fauna;
2
7public record class Configuration
8{
12 public bool DisposeHttpClient { get; }
13
17 public HttpClient HttpClient { get; }
18
22 public string Secret { get; init; }
23
27 public Uri Endpoint { get; init; } = Constants.Endpoints.Default;
28
32 public QueryOptions? DefaultQueryOptions { get; init; } = null;
33
37 public RetryConfiguration RetryConfiguration { get; init; } = new(3, TimeSpan.FromSeconds(20));
38
39
43 public IStatsCollector? StatsCollector { get; init; } = new StatsCollector();
44
50 public Configuration(string secret, HttpClient? httpClient = null)
51 {
52 if (httpClient is null)
53 {
55 {
56 Timeout = TimeSpan.FromSeconds(5)
57 };
58 DisposeHttpClient = true;
59 }
60 else
61 {
62 HttpClient = httpClient;
63 }
64
65 Secret = secret;
66 }
67}
Configuration is a class used to configure a Fauna Client. It encapsulates various settings such as t...
QueryOptions? DefaultQueryOptions
Default options for queries sent to Fauna.
HttpClient HttpClient
The HTTP Client to use for requests.
Uri Endpoint
The endpoint URL of the Fauna server.
Configuration(string secret, HttpClient? httpClient=null)
Initializes a new instance of the Configuration record with the specified secret key.
string Secret
The secret key used for authentication.
bool DisposeHttpClient
Whether the Client should dispose of the HttpClient on Dispose.
IStatsCollector? StatsCollector
StatsCollector for the client.
Represents the options for customizing Fauna queries.
A class representing a retry configuration for queries.
Definition Client.cs:8