-
Notifications
You must be signed in to change notification settings - Fork 4k
enable child channel plugins #12578
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
Open
AgraVator
wants to merge
22
commits into
grpc:master
Choose a base branch
from
AgraVator:child-channel-plugin
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
enable child channel plugins #12578
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
476e5a8
enable child channel plugins
AgraVator 2554a04
add test cases
AgraVator cf4909e
remove unused field
AgraVator 4905f72
correct javadoc
AgraVator 36c2927
plumb child channel options through xDS server
AgraVator 3259d67
add test case for xDS server and others
AgraVator eab10a9
fix: pass the configurer
AgraVator d8398f5
expose APIs similar to internalConfigurator
AgraVator 374cbdf
Merge branch 'master' into child-channel-plugin
AgraVator 367640e
fix: refactor from ChildChannelConfigurer to ChannelConfigurer
AgraVator 0346e90
Merge branch 'master' into child-channel-plugin
AgraVator 3e38536
fix: merge conflict
AgraVator d3eed7f
Fix: rename ChannelConfigurer to ChannelConfigurator and removes the …
AgraVator b9d687d
Fix: left over name changes
AgraVator f816bba
Merge branch 'master' into child-channel-plugin
AgraVator bdcb745
Fix: test cases
AgraVator 4cfc0c6
Fix: test cases
AgraVator 4ff8d40
Fix: formatting
AgraVator b8bd9f1
Fix: suggested changes
AgraVator bfa5a26
Fix: bazel tests
AgraVator 03e55fd
Fix: formatting
AgraVator a7a6494
Fix: suggested changes
AgraVator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /* | ||
| * Copyright 2026 The gRPC Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package io.grpc; | ||
|
|
||
|
|
||
|
|
||
| /** | ||
| * A configurator for child channels created by gRPC's internal infrastructure. | ||
| * | ||
| * <p>This interface allows users to inject configuration (such as credentials, interceptors, | ||
| * or flow control settings) into channels created automatically by gRPC for control plane | ||
| * operations. Common use cases include: | ||
| * <ul> | ||
| * <li>xDS control plane connections</li> | ||
| * <li>Load Balancing helper channels (OOB channels)</li> | ||
| * </ul> | ||
| * | ||
| * <p><strong>Usage Example:</strong> | ||
| * <pre>{@code | ||
| * // 1. Define the configurator | ||
| * ChannelConfigurator configurator = builder -> { | ||
| * builder.maxInboundMessageSize(4 * 1024 * 1024); | ||
| * }; | ||
| * | ||
| * // 2. Apply to parent channel - automatically used for ALL child channels | ||
| * ManagedChannel channel = ManagedChannelBuilder | ||
| * .forTarget("xds:///my-service") | ||
| * .childChannelConfigurator(configurator) | ||
| * .build(); | ||
| * }</pre> | ||
| * | ||
| * <p>Implementations must be thread-safe as the configure methods may be invoked concurrently | ||
| * by multiple internal components. | ||
| * | ||
| * @since 1.83.0 | ||
| */ | ||
| @ExperimentalApi("https://github.com/grpc/grpc-java/issues/12574") | ||
| @FunctionalInterface | ||
| public interface ChannelConfigurator { | ||
|
|
||
| /** | ||
| * Configures a builder for a new child channel. | ||
| * | ||
| * <p>This method is invoked synchronously during the creation of the child channel, | ||
| * before {@link ManagedChannelBuilder#build()} is called. | ||
| * | ||
| * <p><strong>Note:</strong> Implementations must only apply configurations to the | ||
| * provided builder and must NOT call {@code builder.build()} themselves. | ||
| * | ||
| * <p><strong>Note:</strong> The provided {@code builder} is generic ({@code ?}). Implementations | ||
| * should use universal configuration methods (like {@code intercept()}, {@code userAgent()}) on the builder | ||
| * rather than casting it to specific implementation types. | ||
| * | ||
| * @param builder the mutable channel builder for the new child channel | ||
| */ | ||
|
AgraVator marked this conversation as resolved.
AgraVator marked this conversation as resolved.
|
||
| void configureChannelBuilder(ManagedChannelBuilder<?> builder); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.