|
HttpRequestMessage CreateRequest(ClusterModel cluster, DestinationModel destination); |
These being ClusterModel and DestinationModel make it unnecessarily hard to retrieve certain information, like the current health state of the destination, or even its ID.
We should consider accepting ClusterState and DestinationState here instead.
I didn't see any discussion about this specific API shape in #459.
Not sure it's worth a full breaking change, but we could do it by e.g. exposing a new overload with a DIM and optionally obsoleting the existing one.
ValueTask<HttpRequestMessage> CreateRequestAsync(ClusterState cluster, DestinationState destination) =>
ValueTask.FromResult(CreateRequest(cluster.Model, destination.Model));
yarp/src/ReverseProxy/Health/IProbingRequestFactory.cs
Line 20 in 4cce218
These being
ClusterModelandDestinationModelmake it unnecessarily hard to retrieve certain information, like the current health state of the destination, or even its ID.We should consider accepting
ClusterStateandDestinationStatehere instead.I didn't see any discussion about this specific API shape in #459.
Not sure it's worth a full breaking change, but we could do it by e.g. exposing a new overload with a DIM and optionally obsoleting the existing one.