in src/connection-pool.ts [449:464]
private hasSecureHost(): boolean {
const { hosts } = this.options;
if (typeof hosts === 'string') {
return hosts.startsWith(secureProtocolPrefix);
}
const countSecure = hosts.filter(host => host.startsWith(secureProtocolPrefix)).length;
if (countSecure === 0) {
return false;
}
if (countSecure < hosts.length) {
throw new Error('etcd3 cannot be configured with a mix of secure and insecure hosts');
}
return true;
}