Skip to content

Commit

Permalink
xds: hide TlsContextManager in XdsResourceType.Args (grpc#10894)
Browse files Browse the repository at this point in the history
  • Loading branch information
YifeiZhuang authored Feb 6, 2024
1 parent 4f7ec13 commit f6d9221
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion xds/src/main/java/io/grpc/xds/XdsListenerResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ private LdsUpdate processServerSideListener(Listener proto, Args args)
if (args.bootstrapInfo != null && args.bootstrapInfo.certProviders() != null) {
certProviderInstances = args.bootstrapInfo.certProviders().keySet();
}
return LdsUpdate.forTcpListener(parseServerSideListener(proto, args.tlsContextManager,
return LdsUpdate.forTcpListener(parseServerSideListener(proto,
(TlsContextManager) args.securityConfig,
filterRegistry, certProviderInstances));
}

Expand Down
8 changes: 5 additions & 3 deletions xds/src/main/java/io/grpc/xds/XdsResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ public abstract class XdsResourceType<T extends ResourceUpdate> {
// the resources that need an update.
protected abstract boolean isFullStateOfTheWorld();

@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10847")
public static class Args {
final ServerInfo serverInfo;
final String versionInfo;
final String nonce;
final Bootstrapper.BootstrapInfo bootstrapInfo;
final TlsContextManager tlsContextManager;
final Object securityConfig;
// Management server is required to always send newly requested resources, even if they
// may have been sent previously (proactively). Thus, client does not need to cache
// unrequested resources.
Expand All @@ -99,17 +100,18 @@ public static class Args {

public Args(ServerInfo serverInfo, String versionInfo, String nonce,
Bootstrapper.BootstrapInfo bootstrapInfo,
TlsContextManager tlsContextManager,
Object securityConfig,
@Nullable Set<String> subscribedResources) {
this.serverInfo = serverInfo;
this.versionInfo = versionInfo;
this.nonce = nonce;
this.bootstrapInfo = bootstrapInfo;
this.tlsContextManager = tlsContextManager;
this.securityConfig = securityConfig;
this.subscribedResources = subscribedResources;
}
}

@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10847")
public static final class ResourceInvalidException extends Exception {
private static final long serialVersionUID = 0L;

Expand Down

0 comments on commit f6d9221

Please sign in to comment.