| 590 | } |
| 591 | |
| 592 | std::pair<std::optional<std::string>, std::optional<std::string>> |
| 593 | Connection::get_cluster_labels() |
| 594 | { |
| 595 | auto labels = std::make_pair(std::optional<std::string>{}, std::optional<std::string>{}); |
| 596 | auto cppLabels = cluster_.cluster_label_listener()->cluster_labels(); |
| 597 | if (cppLabels.cluster_name.has_value()) { |
| 598 | labels.first = cppLabels.cluster_name.value(); |
| 599 | } |
| 600 | if (cppLabels.cluster_uuid.has_value()) { |
| 601 | labels.second = cppLabels.cluster_uuid.value(); |
| 602 | } |
| 603 | return labels; |
| 604 | } |
| 605 | |
| 606 | PyObject* |
| 607 | Connection::get_cluster_labels_as_py_object() |