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

Allow users outside of io.grpc.xds package to create custom xDS resources #10834

Merged
merged 5 commits into from
Jan 25, 2024

Conversation

anicr7
Copy link
Contributor

@anicr7 anicr7 commented Jan 18, 2024

Currently few of the interfaces needed to define and start a watch for a xDS resource are package private, which can't be used externally outside of io.grpc.xds. Exposing them outside allows users to define their own custom resources and start a watch along with the default supported resources.

Also as part of this change, move an Exception defined in the XdsClientImpl into XdsResourceType. As XdsClientImpl is an implementation package, it makes more sense to expose it via the XdsResourceType class.

cc: @ejona86 , @YifeiZhuang

…rces. Currently few of the interfaces needed to define and start a watch for a xDS resource are package private, which can't be used. Also move a exception definition in the XdsClientImpl into XdsResourceType, instead of exposing via the implementation package.
@anicr7 anicr7 marked this pull request as ready for review January 18, 2024 20:28
@@ -38,7 +39,7 @@
import java.util.Set;
import javax.annotation.Nullable;

abstract class XdsResourceType<T extends ResourceUpdate> {
public abstract class XdsResourceType<T extends ResourceUpdate> {
Copy link
Contributor

@YifeiZhuang YifeiZhuang Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotate the class as @experimentalapi("issue link")
Then create an issue tracking "XdsResourceType is experimental"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@YifeiZhuang YifeiZhuang merged commit 6d96e65 into grpc:master Jan 25, 2024
14 checks passed
@anicr7 anicr7 deleted the custom_resource branch January 26, 2024 23:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants