(hint: string)
| 94 | interface Endpoint { host: string; protocol: string } |
| 95 | |
| 96 | function 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. */ |
| 108 | function endpoints(value: string, hint: string, bare: boolean): Endpoint[] { |
| 109 | if (dynamic(value) || value.length > 4096) return []; |
no outgoing calls
no test coverage detected