Table of Contents

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

IEnumerable<ClusterState>

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

IEnumerable<RouteModel>

TryGetCluster(string, out ClusterState?)

Retrieves a specific cluster by id, if present.

bool TryGetCluster(string id, out ClusterState? cluster)

Parameters

id string
cluster ClusterState

Returns

bool

TryGetRoute(string, out RouteModel?)

Retrieves a specific route by id, if present.

bool TryGetRoute(string id, out RouteModel? route)

Parameters

id string
route RouteModel

Returns

bool