Skip to content

Commit 50434b2

Browse files
meghans-cashsvc-squareup-copybara
authored andcommitted
Revert "Add new field to LD configs to configure event capacity"
Reverts squareup/cash-server#1792 GitOrigin-RevId: d0e574b8cf7e7f2852a06706194868a0688f24fe
1 parent 0c62aa0 commit 50434b2

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

misk-launchdarkly/api/misk-launchdarkly.api

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@ public final class misk/feature/launchdarkly/LaunchDarklyConfig : wisp/config/Co
22
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
33
public fun <init> (Ljava/lang/String;Ljava/lang/String;Z)V
44
public fun <init> (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;)V
5-
public fun <init> (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;Ljava/lang/Integer;)V
6-
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
76
public final fun component1 ()Ljava/lang/String;
87
public final fun component2 ()Ljava/lang/String;
98
public final fun component3 ()Z
109
public final fun component4 ()Lmisk/client/HttpClientSSLConfig;
11-
public final fun component5 ()Ljava/lang/Integer;
12-
public final fun copy (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;Ljava/lang/Integer;)Lmisk/feature/launchdarkly/LaunchDarklyConfig;
13-
public static synthetic fun copy$default (Lmisk/feature/launchdarkly/LaunchDarklyConfig;Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;Ljava/lang/Integer;ILjava/lang/Object;)Lmisk/feature/launchdarkly/LaunchDarklyConfig;
10+
public final fun copy (Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;)Lmisk/feature/launchdarkly/LaunchDarklyConfig;
11+
public static synthetic fun copy$default (Lmisk/feature/launchdarkly/LaunchDarklyConfig;Ljava/lang/String;Ljava/lang/String;ZLmisk/client/HttpClientSSLConfig;ILjava/lang/Object;)Lmisk/feature/launchdarkly/LaunchDarklyConfig;
1412
public fun equals (Ljava/lang/Object;)Z
1513
public final fun getBase_uri ()Ljava/lang/String;
16-
public final fun getEvent_capacity ()Ljava/lang/Integer;
1714
public final fun getSdk_key ()Ljava/lang/String;
1815
public final fun getSsl ()Lmisk/client/HttpClientSSLConfig;
1916
public final fun getUse_relay_proxy ()Z

misk-launchdarkly/src/main/kotlin/misk/feature/launchdarkly/LaunchDarklyFeatureFlagsModule.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import com.google.inject.Provides
55
import com.launchdarkly.sdk.server.Components
66
import com.launchdarkly.sdk.server.LDClient
77
import com.launchdarkly.sdk.server.LDConfig
8-
import com.launchdarkly.sdk.server.integrations.EventProcessorBuilder.DEFAULT_CAPACITY
98
import com.launchdarkly.sdk.server.interfaces.LDClientInterface
109
import com.squareup.moshi.Moshi
1110
import io.micrometer.core.instrument.MeterRegistry
@@ -66,7 +65,7 @@ class LaunchDarklyModule @JvmOverloads constructor(
6665
// Set wait to 0 to not block here. Block in service initialization instead.
6766
.startWait(Duration.ofMillis(0))
6867
.dataSource(Components.streamingDataSource())
69-
.events(Components.sendEvents().capacity(config.event_capacity ?: DEFAULT_CAPACITY))
68+
.events(Components.sendEvents())
7069

7170
if (config.use_relay_proxy) {
7271
ldConfig.serviceEndpoints(
@@ -96,5 +95,4 @@ data class LaunchDarklyConfig @JvmOverloads constructor(
9695
val base_uri: String,
9796
val use_relay_proxy: Boolean = true,
9897
val ssl: HttpClientSSLConfig? = null,
99-
val event_capacity: Int? = null
10098
) : Config

wisp/wisp-launchdarkly/api/wisp-launchdarkly.api

+3-6
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@ public final class wisp/launchdarkly/LaunchDarklyConfig : wisp/config/Config {
2020
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
2121
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;)V
2222
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;Z)V
23-
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZLjava/lang/Integer;)V
24-
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
23+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
2524
public final fun component1 ()Ljava/lang/String;
2625
public final fun component2 ()Ljava/lang/String;
2726
public final fun component3 ()Lwisp/client/HttpClientSSLConfig;
2827
public final fun component4 ()Z
29-
public final fun component5 ()Ljava/lang/Integer;
30-
public final fun copy (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZLjava/lang/Integer;)Lwisp/launchdarkly/LaunchDarklyConfig;
31-
public static synthetic fun copy$default (Lwisp/launchdarkly/LaunchDarklyConfig;Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZLjava/lang/Integer;ILjava/lang/Object;)Lwisp/launchdarkly/LaunchDarklyConfig;
28+
public final fun copy (Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;Z)Lwisp/launchdarkly/LaunchDarklyConfig;
29+
public static synthetic fun copy$default (Lwisp/launchdarkly/LaunchDarklyConfig;Ljava/lang/String;Ljava/lang/String;Lwisp/client/HttpClientSSLConfig;ZILjava/lang/Object;)Lwisp/launchdarkly/LaunchDarklyConfig;
3230
public fun equals (Ljava/lang/Object;)Z
3331
public final fun getBase_uri ()Ljava/lang/String;
34-
public final fun getEvent_capacity ()Ljava/lang/Integer;
3532
public final fun getOffline ()Z
3633
public final fun getSdk_key ()Ljava/lang/String;
3734
public final fun getSsl ()Lwisp/client/HttpClientSSLConfig;

wisp/wisp-launchdarkly/src/main/kotlin/wisp/launchdarkly/LaunchDarklyClient.kt

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package wisp.launchdarkly
33
import com.launchdarkly.sdk.server.Components
44
import com.launchdarkly.sdk.server.LDClient
55
import com.launchdarkly.sdk.server.LDConfig
6-
import com.launchdarkly.sdk.server.integrations.EventProcessorBuilder.DEFAULT_CAPACITY
76
import com.launchdarkly.sdk.server.interfaces.LDClientInterface
87
import wisp.resources.ResourceLoader
98
import wisp.security.ssl.SslContextFactory
@@ -33,7 +32,6 @@ object LaunchDarklyClient {
3332
.streaming(baseUri)
3433
.events(baseUri)
3534
)
36-
.events(Components.sendEvents().capacity(config.event_capacity ?: DEFAULT_CAPACITY))
3735

3836
config.ssl?.let {
3937
val trustStore = sslLoader.loadTrustStore(config.ssl.trust_store)!!

wisp/wisp-launchdarkly/src/main/kotlin/wisp/launchdarkly/LaunchDarklyConfig.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ data class LaunchDarklyConfig @JvmOverloads constructor(
77
val sdk_key: String,
88
val base_uri: String,
99
val ssl: HttpClientSSLConfig? = null,
10-
val offline: Boolean = false,
11-
val event_capacity: Int? = null
10+
val offline: Boolean = false
1211
) : Config

0 commit comments

Comments
 (0)