Commit 211783a
feat: Add FDv2 Streaming Synchronizer (#106)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Adds FDv2 streaming support and refines polling behavior**
>
> - New `StreamingSynchronizerImpl` maintains an SSE connection via
`EventSource`, parses FDv2 events, emits `CHANGE_SET`/status results,
handles recoverable/non-recoverable errors, restarts on `GOODBYE`, and
lazily starts on `next()`; supports selector and `filter` query params
> - Polling updates: map specific `INTERNAL_ERROR` types
(`MISSING_PAYLOAD`, `JSON_ERROR`) to `INVALID_DATA`;
`PollingSynchronizerImpl` now completes a shutdown future on terminal
errors to stop further polling
> - API docs clarified for `Initializer` and `Synchronizer` (state
diagrams; `next()` usage on shutdown/terminal)
> - Extensive tests added for streaming behaviors (events, reconnection,
errors, selector/filter) and for polling internal-error kinds and
shutdown/continuation
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d4dff45. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Todd Anderson <tanderson@launchdarkly.com>1 parent c987dc4 commit 211783a
8 files changed
Lines changed: 1497 additions & 15 deletions
File tree
- lib/sdk/server/src
- main/java/com/launchdarkly/sdk/server
- datasources
- test/java/com/launchdarkly/sdk/server
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
127 | 139 | | |
128 | | - | |
| 140 | + | |
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
0 commit comments