Skip to content

Commit

Permalink
Skriv til en bestemt retention policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-santa committed May 12, 2021
1 parent 08fd3b6 commit ed94b0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal class DataPointRelay(private val influxDB: InfluxDB) {
}

internal object DataPointRelayFactory {

internal fun createDataPointRelay(influxConfig: InfluxConfig): DataPointRelay {
val influxDb = InfluxDBFactory.connect(
"https://${influxConfig.hostName}:${influxConfig.hostPort}",
Expand All @@ -30,6 +31,8 @@ internal object DataPointRelayFactory {

influxDb.setDatabase(influxConfig.databaseName)

influxDb.setRetentionPolicy(influxConfig.retentionPolicyName)

if (influxConfig.enableEventBatching) {
influxDb.enableBatch()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ data class InfluxConfig (
val password: String,
val hostPort: Int,
val databaseName: String,
val retentionPolicyName: String,
val applicationName: String,
val clusterName: String,
val namespace: String,
Expand Down

0 comments on commit ed94b0d

Please sign in to comment.