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. | |
| IStatsCollector? | StatsCollector = new StatsCollector() [get] |
| StatsCollector for the client. | |
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.
| Fauna.Configuration.Configuration | ( | string | secret = "", |
| HttpClient? | httpClient = null, |
||
| ILogger? | logger = null |
||
| ) |
Initializes a new instance of the Configuration record with the specified secret key.
| secret | The secret used for authentication. If null or empty, attempt to use the FAUNA_SECRET env var. |
| httpClient | The HttpClient to use. If null, a default HttpClient is used. |
| logger | A logger. If null, a default logger is used. |
Definition at line 62 of file Configuration.cs.
|
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.
|
get |
Default options for queries sent to Fauna.
Definition at line 43 of file Configuration.cs.
|
get |
Whether the Client should dispose of the HttpClient on Dispose.
Definition at line 17 of file Configuration.cs.
|
get |
The endpoint URL of the Fauna server.
Definition at line 38 of file Configuration.cs.
|
get |
The HTTP Client to use for requests.
Definition at line 28 of file Configuration.cs.
|
get |
The retry configuration to apply to requests.
Definition at line 48 of file Configuration.cs.
|
get |
The secret key used for authentication.
Definition at line 33 of file Configuration.cs.
|
get |
StatsCollector for the client.
Definition at line 54 of file Configuration.cs.