MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / protocolFor

Function protocolFor

graph-ui/src/architecture/container-topology.ts:96–106  ·  view source on GitHub ↗
(hint: string)

Source from the content-addressed store, hash-verified

94interface Endpoint { host: string; protocol: string }
95
96function protocolFor(hint: string): string {
97 if (/redis/i.test(hint)) return 'redis';
98 if (/postgres|pgsql/i.test(hint)) return 'postgres';
99 if (/mysql/i.test(hint)) return 'mysql';
100 if (/mongo/i.test(hint)) return 'mongodb';
101 if (/kafka|broker|bootstrap/i.test(hint)) return 'kafka';
102 if (/amqp|rabbit/i.test(hint)) return 'amqp';
103 if (/grpc/i.test(hint)) return 'grpc';
104 if (/http|fetch|axios|urlopen|requests\./i.test(hint)) return 'http';
105 return 'tcp';
106}
107/** Values are examined only in endpoint-bearing configuration or network-call arguments. */
108function endpoints(value: string, hint: string, bare: boolean): Endpoint[] {
109 if (dynamic(value) || value.length > 4096) return [];

Callers 2

endpointsFunction · 0.85
connectHostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected