MCPcopy Index your code
hub / github.com/callstack/agent-device / sendProxyHealth

Function sendProxyHealth

src/remote/daemon-proxy.ts:82–87  ·  view source on GitHub ↗
(res: ServerResponse, options: Required<DaemonProxyOptions>)

Source from the content-addressed store, hash-verified

80}
81
82async function sendProxyHealth(res: ServerResponse, options: Required<DaemonProxyOptions>) {
83 const upstream = await readUpstreamHealth(options);
84 res.statusCode = 200;
85 res.setHeader('content-type', 'application/json');
86 res.end(JSON.stringify(buildDaemonHealthPayload('agent-device-proxy', { upstream })));
87}
88
89async function readUpstreamHealth(options: Required<DaemonProxyOptions>): Promise<unknown> {
90 const upstreamUrl = new URL(buildDaemonHttpUrl(options.upstreamBaseUrl, 'health'));

Callers 1

handleProxyRequestFunction · 0.85

Calls 2

buildDaemonHealthPayloadFunction · 0.90
readUpstreamHealthFunction · 0.85

Tested by

no test coverage detected