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

Provide 'default' static functions for making client/server configuration #1198

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jun 7, 2021

Motivation:

The ClientConnection and Server configuration objects are reasonably
large and contain many deafult initialized fields. Whenever we add a
field we need to add a new initializer and deprecate the old one in
order to not break API. Providing a static 'default' function which only
accepts the required properties allows us to add defaulted values without
doing the deprecate and replace.

Modifications:

  • Add default methods to ClientConnection.Configuration and
    Server.Configuration
  • Deprecate inits.

Result:

Easier to add new fields in the future.

…tion

Motivation:

The `ClientConnection` and `Server` configuration objects are reasonably
large and contain many deafult initialized fields. Whenever we add a
field we need to add a new initializer and deprecate the old one in
order to not break API. Providing a static 'default' function which only
accepts the required properties allows us to add defaulted values without
doing the deprecate and replace.

Modifications:

- Add `default` methods to `ClientConnection.Configuration` and
  `Server.Configuration`
- Deprecate `init`s.

Result:

Easier to add new fields in the future.
@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label Jun 7, 2021
@glbrntt glbrntt requested a review from Lukasa June 7, 2021 13:06
@glbrntt glbrntt merged commit 4ea3cd0 into grpc:main Jun 7, 2021
@glbrntt glbrntt deleted the gb-default-config branch June 7, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants