Skip to content

Commit

Permalink
Add placeholder maybePublishConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-safran committed Dec 14, 2024
1 parent 579f4e0 commit 32c80c0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions xds/src/main/java/io/grpc/xds/XdsDependencyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,15 @@ private void releaseSubscription(ClusterSubscription subscription) {
if (subscriptions.isEmpty()) {
clusterSubscriptions.remove(clusterName);
// TODO release XdsClient watches for this cluster and its endpoint
maybePublishConfig();
}
}

private void maybePublishConfig() {
// Check if all resources have results and if so generate a new XdsConfig and send it to all
// the watchers
}

@Override
public String toString() {
return logId.toString();
Expand Down Expand Up @@ -218,8 +224,8 @@ private LdsWatcher(String resourceName) {

@Override
public void onChanged(XdsListenerResource.LdsUpdate update) {
// TODO: process the update and add an RdsWatcher if needed
// else see if we should publish a new XdsConfig
// TODO: process the update and add an RdsWatcher if needed
// If none needed call maybePublishConfig()
}
}

Expand All @@ -232,7 +238,7 @@ public RdsWatcher(String resourceName) {
@Override
public void onChanged(RdsUpdate update) {
// TODO: process the update and add CdsWatchers for all virtual hosts as needed
// If none needed see if we should publish a new XdsConfig
// If none needed call maybePublishConfig()
}
}

Expand All @@ -246,7 +252,7 @@ private CdsWatcher(String resourceName) {
@Override
public void onChanged(XdsClusterResource.CdsUpdate update) {
// TODO: process the update and add an EdsWatcher if needed
// else see if we should publish a new XdsConfig
// else call maybePublishConfig()
}
}

Expand All @@ -257,7 +263,9 @@ private EdsWatcher(String resourceName) {

@Override
public void onChanged(XdsEndpointResource.EdsUpdate update) {
// TODO: process the update and see if we should publish a new XdsConfig
// TODO: process the update
maybePublishConfig();

}
}
}

0 comments on commit 32c80c0

Please sign in to comment.