ping method

Future<PingResult> ping([
  1. PingOptions? options
])

Performs a ping operation against the cluster.

Pings the services which are specified (or all services if none are specified). Returns a report which describes the outcome of the ping operations which were performed.

Implementation

Future<PingResult> ping([PingOptions? options]) async {
  final response = await _connection.ping(
    reportId: options?.reportId,
    services: options?.serviceTypes
        ?.map((serviceType) => serviceType.toMessage())
        .toSet(),
    bucketName: options?.bucket,
    // TODO: Send to C++ client.
    // timeout: options?.timeout,
  );
  return response.toApi();
}