trafficShadow
consttrafficShadow: (config?) =>Policy
Defined in: src/policies/traffic/traffic-shadow.ts:58
Traffic shadow policy.
Mirrors traffic to a secondary upstream after the primary response is ready. The shadow request is fire-and-forget and never affects the primary response.
Parameters
Section titled “Parameters”config?
Section titled “config?”Returns
Section titled “Returns”Example
Section titled “Example”import { trafficShadow } from "@homegrower-club/stoma";
trafficShadow({ target: "https://shadow.internal", percentage: 10, methods: ["POST", "PUT"],});