-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore: add fdv2 store & update sources to use fdv2 protocol definitions #192
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
5f6af74
chore: add fdv2 store
cwaldren-ld 941fee4
remove old comment
cwaldren-ld d11e039
introduce DataQuality enum
cwaldren-ld 4d03305
add SetPersist
cwaldren-ld 24f380e
use persist concept
cwaldren-ld 097429e
make store implement FDv2 protocol
cwaldren-ld c72dd6d
remove old data destination interface
cwaldren-ld c530451
revert chnages to datasource/streaming_data_source_events.go
cwaldren-ld 01aa57b
use fdv2 types in streaming data source event handler
cwaldren-ld aa67ce4
refactor concurrency tests
cwaldren-ld 2a54265
optimize comments on store.go
cwaldren-ld 76da39e
add dump method to memory store for atomically getting segments and f…
cwaldren-ld f4772f6
inMemoryStore tests for SetBasis/ApplyDelta
cwaldren-ld 521c1d3
add new memorystorev2 package
cwaldren-ld 0d2f8e9
update tests
cwaldren-ld d853f88
more unit tests
cwaldren-ld 3e5a64d
chore: introduce memorystorev2
cwaldren-ld 84b493c
benchmarks
cwaldren-ld 6432563
lints
cwaldren-ld 746c1a8
use defer pattern for locks
cwaldren-ld b0c8a7c
make element matcher consistent
cwaldren-ld eaab968
doc tweaks
cwaldren-ld fd652d1
Merge branch 'cw/sdk-709/memory-store' into cw/sdk-557/fdv2-store
cwaldren-ld b755ed9
add better collection matcher
cwaldren-ld c54fff0
Merge branch 'v7' into cw/sdk-557/fdv2-store
cwaldren-ld b4ec701
make Selector a pointer type
cwaldren-ld 924722a
cleanup persistent store insertion logic
cwaldren-ld 84c5ef0
lints
cwaldren-ld f75bc04
more lints
cwaldren-ld fa2b9e6
Merge branch 'v7' into cw/sdk-557/fdv2-store
cwaldren-ld 024c0df
attempt to suppress TODO lint failures
cwaldren-ld 6ac4d74
move store.init() into store.SetBasis
cwaldren-ld f72ebc0
no need to inspect error from ApplyDelta/SetBasis
cwaldren-ld ecfef44
remove old TODO
cwaldren-ld 39478ba
refactor: more fdv2 protocol types + usage in data sources (#198)
cwaldren-ld e2a9ce3
Merge branch 'v7' into cw/sdk-557/fdv2-store
cwaldren-ld 8809b4e
refactor: insert items into fdv2 store in dependency order (#197)
cwaldren-ld b1ce858
code review: fixing comments
cwaldren-ld e5bb240
lints
cwaldren-ld e6ddefe
remove circular dependency in toposort
cwaldren-ld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package datasourcev2 | ||
|
||
import "github.com/launchdarkly/go-server-sdk/v7/internal/fdv2proto" | ||
|
||
// PollingResponse represents the result of a polling request. | ||
type PollingResponse struct { | ||
events []fdv2proto.Event | ||
cached bool | ||
intent fdv2proto.IntentCode | ||
cwaldren-ld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
selector *fdv2proto.Selector | ||
} | ||
|
||
// NewCachedPollingResponse indicates that the response has not changed. | ||
func NewCachedPollingResponse() *PollingResponse { | ||
return &PollingResponse{ | ||
cached: true, | ||
} | ||
} | ||
|
||
// NewPollingResponse indicates that data was received. | ||
func NewPollingResponse(intent fdv2proto.IntentCode, events []fdv2proto.Event, | ||
selector *fdv2proto.Selector) *PollingResponse { | ||
return &PollingResponse{ | ||
events: events, | ||
intent: intent, | ||
selector: selector, | ||
} | ||
} | ||
|
||
// Events returns the events in the response. | ||
func (p *PollingResponse) Events() []fdv2proto.Event { | ||
return p.events | ||
} | ||
|
||
// Cached returns true if the response was cached, meaning data has not changed. | ||
func (p *PollingResponse) Cached() bool { | ||
return p.cached | ||
} | ||
|
||
// Intent returns the server intent code of the response. | ||
func (p *PollingResponse) Intent() fdv2proto.IntentCode { | ||
return p.intent | ||
} | ||
|
||
// Selector returns the Selector of the response. | ||
func (p *PollingResponse) Selector() *fdv2proto.Selector { | ||
return p.selector | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a reversion of recent changes that made these public (for use in datasourcev2), but are no longer necessary.