Interface IProxyStateLookup
- Namespace
- Yarp.ReverseProxy
- Assembly
- Yarp.ReverseProxy.dll
Allows access to the proxy's current set of routes and clusters.
public interface IProxyStateLookup
Methods
GetClusters()
Enumerates all current clusters. This is thread safe but the collection may change mid enumeration if the configuration is reloaded.
IEnumerable<ClusterState> GetClusters()
Returns
GetRoutes()
Enumerates all current routes. This is thread safe but the collection may change mid enumeration if the configuration is reloaded.
IEnumerable<RouteModel> GetRoutes()
Returns
TryGetCluster(string, out ClusterState?)
Retrieves a specific cluster by id, if present.
bool TryGetCluster(string id, out ClusterState? cluster)
Parameters
id
stringcluster
ClusterState
Returns
TryGetRoute(string, out RouteModel?)
Retrieves a specific route by id, if present.
bool TryGetRoute(string id, out RouteModel? route)
Parameters
id
stringroute
RouteModel