Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: streaming/polling processors take DataDestination/StatusReporter interfaces #191

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Sep 17, 2024

This change splits up the monolithic DataSourceUpdateSink into two:

  1. DataDestination: where data goes
  2. StatusReporter: where statuses go

This makes it easier to mock them for testing, and also represents a cleaner separation of concerns. Finally, these interfaces are slightly different than the DataSourceUpdateSink for FDV1 vs FDV2.

In the new system, we want to be able to do things like passing a payload version in Init.

I've added doc comments that these interfaces are not stable, since they are public.

@cwaldren-ld cwaldren-ld force-pushed the cw/sdk-556/refactor-processor-interfaces branch from df8afaf to be89344 Compare September 17, 2024 22:55
@cwaldren-ld cwaldren-ld marked this pull request as ready for review September 17, 2024 22:55
@cwaldren-ld cwaldren-ld requested a review from a team as a code owner September 17, 2024 22:55
@cwaldren-ld cwaldren-ld changed the title refactor: streamin/polling processors take DataDestination/StatusReporter interfaces refactor: streaming/polling processors take DataDestination/StatusReporter interfaces Sep 17, 2024
@cwaldren-ld cwaldren-ld force-pushed the cw/sdk-556/refactor-processor-interfaces branch from 6c5fadb to 7b0cf44 Compare September 17, 2024 23:11
subsystems/data_source_status_reporter.go Outdated Show resolved Hide resolved
ldcomponents/streaming_data_source_builder_v2_test.go Outdated Show resolved Hide resolved
ldcomponents/streaming_data_source_builder_v2_test.go Outdated Show resolved Hide resolved
internal/sharedtest/mocks/mock_data_destination.go Outdated Show resolved Hide resolved
cwaldren-ld and others added 3 commits September 18, 2024 13:02
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
@cwaldren-ld cwaldren-ld merged commit a2fd391 into v7 Sep 18, 2024
19 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sdk-556/refactor-processor-interfaces branch September 18, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants