20
20
public class EppoClient extends BaseEppoClient {
21
21
private static final Logger log = LoggerFactory .getLogger (EppoClient .class );
22
22
23
- private static final String DEFAULT_HOST = "https://fscdn.eppo.cloud" ;
24
23
private static final boolean DEFAULT_IS_GRACEFUL_MODE = true ;
25
24
private static final boolean DEFAULT_FORCE_REINITIALIZE = false ;
26
25
private static final long DEFAULT_POLLING_INTERVAL_MS = 30 * 1000 ;
@@ -38,19 +37,20 @@ public static EppoClient getInstance() {
38
37
39
38
private EppoClient (
40
39
String apiKey ,
41
- String host ,
42
40
String sdkName ,
43
41
String sdkVersion ,
42
+ @ Nullable String baseUrl ,
44
43
@ Nullable AssignmentLogger assignmentLogger ,
45
44
@ Nullable BanditLogger banditLogger ,
46
45
boolean isGracefulMode ,
47
46
@ Nullable IAssignmentCache assignmentCache ,
48
47
@ Nullable IAssignmentCache banditAssignmentCache ) {
49
48
super (
50
49
apiKey ,
51
- host ,
52
50
sdkName ,
53
51
sdkVersion ,
52
+ null ,
53
+ baseUrl ,
54
54
assignmentLogger ,
55
55
banditLogger ,
56
56
null ,
@@ -77,7 +77,7 @@ public static class Builder {
77
77
private boolean isGracefulMode = DEFAULT_IS_GRACEFUL_MODE ;
78
78
private boolean forceReinitialize = DEFAULT_FORCE_REINITIALIZE ;
79
79
private long pollingIntervalMs = DEFAULT_POLLING_INTERVAL_MS ;
80
- private String host = DEFAULT_HOST ;
80
+ private String apiBaseUrl = null ;
81
81
82
82
// Assignment and bandit caching on by default. To disable, call
83
83
// `builder.assignmentCache(null).banditAssignmentCache(null);`
@@ -139,11 +139,11 @@ public Builder pollingIntervalMs(long pollingIntervalMs) {
139
139
}
140
140
141
141
/**
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.
144
144
*/
145
- public Builder host (String host ) {
146
- this .host = host ;
145
+ public Builder apiBaseUrl (String apiBaseUrl ) {
146
+ this .apiBaseUrl = apiBaseUrl ;
147
147
return this ;
148
148
}
149
149
@@ -178,7 +178,7 @@ public EppoClient buildAndInit() {
178
178
apiKey ,
179
179
sdkName ,
180
180
sdkVersion ,
181
- host ,
181
+ apiBaseUrl ,
182
182
assignmentLogger ,
183
183
banditLogger ,
184
184
isGracefulMode ,
0 commit comments