Path: redb-route/redb.Route/Abstractions/RoutePolicyDescriptor.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Abstractions/RoutePolicyDescriptor.cs
----
namespace redb.Route.Abstractions;
///
/// Effective cluster-policy resolution result for a single compiled route.
/// Surfaces what the route requested versus what actually got applied at compile time —
/// the answer to "the route is marked .Cluster(true), but is it actually clustered?".
///
///
/// true if the route definition called .Cluster(true) (i.e., requested clustered execution).
///
///
/// Short tag describing the policy that was actually attached:
///
/// - "AllNodes" — no policy attached; the route runs on every node.
/// - "ClusterLeader" — a clustered policy from a registered factory was attached.
/// - "Custom" — an explicit .RoutePolicy(...) was set on the definition.
///
///
///
/// Fully-qualified type name of the that produced the policy,
/// or null when no factory was used.
///
///
/// Human-readable explanation, e.g. "No IRoutePolicyFactory registered — running on all nodes"
/// or "Policy supplied by ClusteredRoutePolicyFactory".
///
public sealed record RoutePolicyDescriptor(
bool RequestedCluster,
string EffectivePolicy,
string? PolicyFactoryType,
string Reason);