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

Use a separate entity to configure the client #19

Closed
vykulakov opened this issue Dec 25, 2019 · 0 comments
Closed

Use a separate entity to configure the client #19

vykulakov opened this issue Dec 25, 2019 · 0 comments
Assignees

Comments

@vykulakov
Copy link
Collaborator

To create an instance of the client it is necessary to pass many params to it even if some of them are not used. In addition, the number of params may grow as time passes so the current approach doesn't look convenient and sophisticated enough.

Another way is using a separate object to encapsulate all available parameters. We may construct that object with a builder and then pass it as a single parameter to the client constructor. Additionally, we may have many than one constructors to create clients with small subsets of most used parameters like compression level and buffer size.

Some examples of implementation of that idea:

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

No branches or pull requests

1 participant