-
Notifications
You must be signed in to change notification settings - Fork 3
feat: initial pass of server-side Client object #176
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
Conversation
|
This pull request has been linked to Shortcut Story #206678: Server-side client object. |
| data_sources/streaming_data_source.hpp | ||
| event_processor/event_processor.hpp | ||
| event_processor/null_event_processor.hpp | ||
| flag_manager/flag_store.hpp |
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.
These event processor files live in internal now, so they can be shared with the server-side SDK.
| event_processor_ = | ||
| std::make_unique<events::AsioEventProcessor<ClientSDK>>( | ||
| ioc_.get_executor(), config.ServiceEndpoints(), config.Events(), | ||
| http_properties_, logger_); |
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.
Before, EventProcessor was a very thin wrapper that forwarded its arguments to AsioEventProcessor. This worked fine when only the client SDK existed. Ideally, we'd like to share that interface with the server.
Now, I've moved the event processor interface to internal (IEventProcessor). I've also made AsioEventProcessor implement IEventProcessor directly.
Through this combination, both the server and client can now directly instantiate either AsioEventProcessor or NullEventProcessor as needed.
(this could be better with a picture, I'll work on a mermaid.)
| @@ -1,50 +0,0 @@ | |||
| #pragma once | |||
|
|
|||
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.
These are no longer client-specific, so I've moved them to a common_events.hpp.
libs/server-sdk/src/client_impl.cpp
Outdated
| Value default_value, | ||
| bool check_type, | ||
| bool detailed) { | ||
| // auto desc = memory_store_.GetFlag(key); |
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.
Evaluator PR isn't merged yet.
700cfab to
34bcd43
Compare
| /** | ||
| * Interface for the standard SDK client methods and properties. | ||
| */ | ||
| class IClient { |
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 whole interface is copied from the client, so adjustments will need to be made in subsequent PRs.
libs/server-sdk/include/launchdarkly/server_side/data_source_status.hpp
Outdated
Show resolved
Hide resolved
libs/server-sdk/include/launchdarkly/server_side/data_source_status.hpp
Outdated
Show resolved
Hide resolved
kinyoklion
left a comment
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.
Misclick. Meant to request changes for the data source state.
This is a first pass at creating the server-side Client object / facade. It is based on the client-side object of the same name.
I've commented out some parts to get it building and market them with TODOs.