(serverDescriptions: Map<string, ServerDescription>)
| 538 | } |
| 539 | |
| 540 | function checkHasPrimary(serverDescriptions: Map<string, ServerDescription>): TopologyType { |
| 541 | for (const serverDescription of serverDescriptions.values()) { |
| 542 | if (serverDescription.type === ServerType.RSPrimary) { |
| 543 | return TopologyType.ReplicaSetWithPrimary; |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | return TopologyType.ReplicaSetNoPrimary; |
| 548 | } |
no outgoing calls
no test coverage detected