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

Builder API for configuring enclosed objects #716

Closed
milyin opened this issue Feb 5, 2024 · 2 comments
Closed

Builder API for configuring enclosed objects #716

milyin opened this issue Feb 5, 2024 · 2 comments
Labels
question Further information is requested

Comments

@milyin
Copy link
Contributor

milyin commented Feb 5, 2024

Describe the feature

Summarizing discussion here: #656
We need to decide how to process optional internal structures in builder pattern. If structure is not optional, like Samplein PutBuilder, we can expose sample's encoding method from PutBuilder itself. But if the Sample is optional, like in GetBuilder, the setting of encoding should also add this sample.
Possible solutions:

  • GetBuilder::encoding implicitly adds Sample
  • GetBuilder provides some sub-builder, which explicilty adds default Sample and allows to set encoding
  • Do not expose methods for configuring optional interlal structures
  • something else?
@milyin milyin added enhancement Existing things could work better question Further information is requested new feature Something new is needed labels Feb 5, 2024
@milyin milyin moved this to Backlog in Zenoh 1.0.0 release Feb 5, 2024
@milyin milyin removed enhancement Existing things could work better new feature Something new is needed labels Mar 12, 2024
@milyin
Copy link
Contributor Author

milyin commented Mar 14, 2024

Discussed with @Mallets
methods with_payload and with_encoding should be used for get operation
Consider removing Value type and flatten encoding and payload everywhere.

@milyin
Copy link
Contributor Author

milyin commented Mar 27, 2024

It was decided to make builders API as flat as possible. Value is already deconstructed to payload and encoding, QoS is accessed through priority, express etc.

@milyin milyin closed this as completed Mar 27, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zenoh 1.0.0 release Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

1 participant