Skip to content

Commit

Permalink
chore: add a default endpoint to the provider (#115)
Browse files Browse the repository at this point in the history
add GLOBAL as default provider endpoint
  • Loading branch information
nickybondarenko authored Jan 8, 2024
1 parent 605c509 commit dc53f9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class ConfidenceFeatureProvider private constructor(
fun create(
context: Context,
clientSecret: String,
region: ConfidenceRegion = ConfidenceRegion.EUROPE,
region: ConfidenceRegion = ConfidenceRegion.GLOBAL,
initialisationStrategy: InitialisationStrategy = InitialisationStrategy.FetchAndActivate,
hooks: List<Hook<*>> = listOf(),
client: ConfidenceClient? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.spotify.confidence.client

enum class ConfidenceRegion {
GLOBAL,
EUROPE,
USA
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ConfidenceRemoteClient : ConfidenceClient {
"application/json"
)
baseUrl = when (region) {
ConfidenceRegion.GLOBAL -> "https://resolver.confidence.dev"
ConfidenceRegion.EUROPE -> "https://resolver.eu.confidence.dev"
ConfidenceRegion.USA -> "https://resolver.us.confidence.dev"
}
Expand Down

0 comments on commit dc53f9f

Please sign in to comment.