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

Add http2 routes support #312

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Add http2 routes support #312

merged 1 commit into from
Nov 14, 2023

Conversation

IvanBorislavovDimitrov
Copy link
Member

LMCROSSITXSADEPLOY-2647

@Nullable
public abstract Integer getWeight();

public abstract String getProtocol();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be nullable as well? We can return null in the "raw" object when building RouteDestination

Copy link
Member Author

Choose a reason for hiding this comment

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

Protocol to use for this destination. Valid protocols are http1 or http2 if route protocol is http, tcp if route protocol is tcp. A null value will set it either http1 or tcp based on the route protocol; this feature is only available if you turn it on in routing release
According to the doc, it should not return null. We use the object only for getting a route, for the creation of the destination requestedProtocol is used

}
return currentRoute.getDestinations()
.stream()
.noneMatch(routeDestination -> Objects.equals(routeDestination.getApplicationGuid(), applicationGuid)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a cleaner way to do this would be

.stream()
.filter(dest -> Object.equals(dest.appGui(), appGuid))
.noneMatch(dest -> <protocol equality>)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

LMCROSSITXSADEPLOY-2647
@IvanBorislavovDimitrov IvanBorislavovDimitrov merged commit 1c1c827 into master Nov 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants