Logos DX
    Preparing search index...

    Interface BasePolicyRule<S, H, P>

    Base interface for all policy rules.

    Extends MatchTypes for route matching and provides common fields shared across all resilience policies (dedupe, cache, rate-limit, retry).

    interface BasePolicyRule<S = unknown, H = unknown, P = unknown> {
        enabled?: boolean;
        endsWith?: string;
        includes?: string;
        is?: string;
        match?: RegExp;
        methods?: _InternalHttpMethods[];
        serializer?: RequestSerializer<S, H, P>;
        startsWith?: string;
    }

    Type Parameters

    • S = unknown

      Instance state type

    • H = unknown

      Headers type

    • P = unknown

      Params type

    Hierarchy (View Summary)

    Index

    Properties

    enabled?: boolean

    Enable/disable for matched routes

    endsWith?: string

    Path must end with this suffix

    includes?: string

    Path must contain this substring

    is?: string

    Exact path match

    match?: RegExp

    Path must match this regular expression

    HTTP methods this rule applies to

    serializer?: RequestSerializer<S, H, P>

    Custom serializer for this rule's key generation

    startsWith?: string

    Path must start with this prefix