connect static method

Future<Cluster> connect(
  1. List<String> hostPorts, {
  2. required Authenticator authenticator,
  3. Consistency? consistency,
})

Implementation

static Future<Cluster> connect(
  List<String> hostPorts, {
  required Authenticator authenticator,
  Consistency? consistency,
}) async {
  final client = Cluster._(authenticator, consistency);
  for (String hostPort in hostPorts) {
    await client._connect(hostPort);
  }
  await client._collectPeers();
  await client._loadPeerTokens();
  return client;
}