2020public class EppoClient extends BaseEppoClient {
2121 private static final Logger log = LoggerFactory .getLogger (EppoClient .class );
2222
23- private static final String DEFAULT_HOST = "https://fscdn.eppo.cloud" ;
2423 private static final boolean DEFAULT_IS_GRACEFUL_MODE = true ;
2524 private static final boolean DEFAULT_FORCE_REINITIALIZE = false ;
2625 private static final long DEFAULT_POLLING_INTERVAL_MS = 30 * 1000 ;
@@ -38,19 +37,20 @@ public static EppoClient getInstance() {
3837
3938 private EppoClient (
4039 String apiKey ,
41- String host ,
4240 String sdkName ,
4341 String sdkVersion ,
42+ @ Nullable String baseUrl ,
4443 @ Nullable AssignmentLogger assignmentLogger ,
4544 @ Nullable BanditLogger banditLogger ,
4645 boolean isGracefulMode ,
4746 @ Nullable IAssignmentCache assignmentCache ,
4847 @ Nullable IAssignmentCache banditAssignmentCache ) {
4948 super (
5049 apiKey ,
51- host ,
5250 sdkName ,
5351 sdkVersion ,
52+ null ,
53+ baseUrl ,
5454 assignmentLogger ,
5555 banditLogger ,
5656 null ,
@@ -77,7 +77,7 @@ public static class Builder {
7777 private boolean isGracefulMode = DEFAULT_IS_GRACEFUL_MODE ;
7878 private boolean forceReinitialize = DEFAULT_FORCE_REINITIALIZE ;
7979 private long pollingIntervalMs = DEFAULT_POLLING_INTERVAL_MS ;
80- private String host = DEFAULT_HOST ;
80+ private String apiBaseUrl = null ;
8181
8282 // Assignment and bandit caching on by default. To disable, call
8383 // `builder.assignmentCache(null).banditAssignmentCache(null);`
@@ -139,11 +139,11 @@ public Builder pollingIntervalMs(long pollingIntervalMs) {
139139 }
140140
141141 /**
142- * Overrides the host from where it fetches configurations. This typically should not be
143- * explicitly set so that the default of the Fastly CDN is used.
142+ * Overrides the base URL from where the SDK fetches configurations. This typically should not
143+ * be explicitly set so that the default API URL is used.
144144 */
145- public Builder host (String host ) {
146- this .host = host ;
145+ public Builder apiBaseUrl (String apiBaseUrl ) {
146+ this .apiBaseUrl = apiBaseUrl ;
147147 return this ;
148148 }
149149
@@ -178,7 +178,7 @@ public EppoClient buildAndInit() {
178178 apiKey ,
179179 sdkName ,
180180 sdkVersion ,
181- host ,
181+ apiBaseUrl ,
182182 assignmentLogger ,
183183 banditLogger ,
184184 isGracefulMode ,
0 commit comments