You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Removed all java.time usage
* fix: Update readme to point out that we've reverted to milliseconds for all durations
* Added a couple of more tests of the builders
* chore: also add a test that checks that we can configure http client with cache
* fix: add readme note about minimum sdk level
.pollMode(PollingModes.autoPoll(60000) { poll interval in milliseconds
104
80
featuresUpdated()
105
81
})
106
82
.build()
@@ -144,6 +120,6 @@ val config = UnleashConfig
144
120
145
121
The default configuration configures a daemon to report metrics once every minute, this can be altered using the `metricsInterval(Duration d)` method on the builder, so if you'd rather see us post in 5 minutes intervals you could do
Copy file name to clipboardExpand all lines: src/main/kotlin/io/getunleash/UnleashConfig.kt
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,10 @@ package io.getunleash
2
2
3
3
importio.getunleash.polling.AutoPollingMode
4
4
importio.getunleash.polling.PollingMode
5
-
importjava.time.Duration
6
5
importjava.util.UUID
7
6
8
7
9
-
data classReportMetrics(valmetricsInterval:Duration = Duration.ofSeconds(60))
8
+
data classReportMetrics(valmetricsInterval:Long = 60000)
10
9
/**
11
10
* Represents configuration for Unleash.
12
11
* @property url HTTP(s) URL to the Unleash Proxy (Required).
@@ -15,8 +14,8 @@ data class ReportMetrics(val metricsInterval: Duration = Duration.ofSeconds(60))
15
14
* @property environment which environment is the application running in. Will be used as default argument for the [io.getunleash.UnleashContext]. (Optional - Defaults to 'default')
16
15
* @property instanceId instance id of your client
17
16
* @property pollingMode How to poll for features. Defaults to [io.getunleash.polling.AutoPollingMode] with poll interval set to 60 seconds.
18
-
* @property httpClientReadTimeout How long to wait for HTTP reads. (Optional - Defaults to 5 seconds)
19
-
* @property httpClientConnectionTimeout How long to wait for HTTP connection. (Optional - Defaults to 2 seconds)
17
+
* @property httpClientReadTimeout How long to wait for HTTP reads in milliseconds. (Optional - Defaults to 5000)
18
+
* @property httpClientConnectionTimeout How long to wait for HTTP connection in milliseconds. (Optional - Defaults to 2000)
20
19
* @property httpClientCacheSize Disk space (in bytes) set aside for http cache. (Optional - Defaults to 10MB)
21
20
* @property reportMetrics Should the client collate and report metrics? The [io.getunleah.ReportMetrics] dataclass includes a metricsInterval field which defaults to 60 seconds. (Optional - defaults to null)
0 commit comments