Namespace InfluxDB3.Client.Config
Classes
ClientConfig
The ClientConfig class holds the configuration for the InfluxDB client.
You can configure following options:
If you want create client with custom options, you can use the following code:
using var client = new InfluxDBClient(new ClientConfig{
Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
Token = "my-token",
Organization = "my-org",
Database = "my-database",
AllowHttpRedirects = true,
DisableServerCertificateValidation = true,
WriteOptions = new WriteOptions
{
Precision = WritePrecision.S,
GzipThreshold = 4096
}
});
WriteOptions
The WriteOptions class holds the configuration for writing data to InfluxDB.
You can configure following options:
- Precision: The default precision to use for the timestamp of points if no precision is specified in the write API call.
- GzipThreshold: The threshold in bytes for gzipping the body. The default value is 1000.
If you want create client with custom options, you can use the following code:
using var client = new InfluxDBClient(new ClientConfig
{
Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
Token = "my-token",
Organization = "my-org",
Database = "my-database",
WriteOptions = new WriteOptions
{
Precision = WritePrecision.S,
GzipThreshold = 4096
}
});