Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Fauna.Configuration Class Reference

Configuration is a class used to configure a Fauna Client. It encapsulates various settings such as the Endpoint, secret, query timeout, and others. More...

Public Member Functions

 Configuration (string secret="", HttpClient? httpClient=null, ILogger? logger=null)
 Initializes a new instance of the Configuration record with the specified secret key.
 

Properties

bool DisposeHttpClient = true [get]
 Whether the Client should dispose of the HttpClient on Dispose.
 
TimeSpan ClientBufferTimeout = TimeSpan.FromSeconds(5) [get]
 Additional buffer to add to QueryOptions.QueryTimeout when setting the HTTP request timeout on the HttpClient; default is 5 seconds.
 
HttpClient HttpClient [get]
 The HTTP Client to use for requests.
 
string Secret = Environment.GetEnvironmentVariable("FAUNA_SECRET") ?? string.Empty [get]
 The secret key used for authentication.
 
Uri Endpoint = Endpoints.GetFaunaEndpoint() [get]
 The endpoint URL of the Fauna server.
 
QueryOptions DefaultQueryOptions = new() [get]
 Default options for queries sent to Fauna.
 
RetryConfiguration RetryConfiguration = new(3, TimeSpan.FromSeconds(20)) [get]
 The retry configuration to apply to requests.
 
IStatsCollectorStatsCollector = new StatsCollector() [get]
 StatsCollector for the client.
 

Detailed Description

Configuration is a class used to configure a Fauna Client. It encapsulates various settings such as the Endpoint, secret, query timeout, and others.

Definition at line 12 of file Configuration.cs.

Constructor & Destructor Documentation

◆ Configuration()

Fauna.Configuration.Configuration ( string  secret = "",
HttpClient httpClient = null,
ILogger?  logger = null 
)

Initializes a new instance of the Configuration record with the specified secret key.

Parameters
secretThe secret used for authentication. If null or empty, attempt to use the FAUNA_SECRET env var.
httpClientThe HttpClient to use. If null, a default HttpClient is used.
loggerA logger. If null, a default logger is used.

Definition at line 62 of file Configuration.cs.

Property Documentation

◆ ClientBufferTimeout

TimeSpan Fauna.Configuration.ClientBufferTimeout = TimeSpan.FromSeconds(5)
get

Additional buffer to add to QueryOptions.QueryTimeout when setting the HTTP request timeout on the HttpClient; default is 5 seconds.

Definition at line 23 of file Configuration.cs.

◆ DefaultQueryOptions

QueryOptions Fauna.Configuration.DefaultQueryOptions = new()
get

Default options for queries sent to Fauna.

Definition at line 43 of file Configuration.cs.

◆ DisposeHttpClient

bool Fauna.Configuration.DisposeHttpClient = true
get

Whether the Client should dispose of the HttpClient on Dispose.

Definition at line 17 of file Configuration.cs.

◆ Endpoint

Uri Fauna.Configuration.Endpoint = Endpoints.GetFaunaEndpoint()
get

The endpoint URL of the Fauna server.

Definition at line 38 of file Configuration.cs.

◆ HttpClient

HttpClient Fauna.Configuration.HttpClient
get

The HTTP Client to use for requests.

Definition at line 28 of file Configuration.cs.

◆ RetryConfiguration

RetryConfiguration Fauna.Configuration.RetryConfiguration = new(3, TimeSpan.FromSeconds(20))
get

The retry configuration to apply to requests.

Definition at line 48 of file Configuration.cs.

◆ Secret

string Fauna.Configuration.Secret = Environment.GetEnvironmentVariable("FAUNA_SECRET") ?? string.Empty
get

The secret key used for authentication.

Definition at line 33 of file Configuration.cs.

◆ StatsCollector

IStatsCollector? Fauna.Configuration.StatsCollector = new StatsCollector()
get

StatsCollector for the client.

Definition at line 54 of file Configuration.cs.


The documentation for this class was generated from the following file: