couchbase 4.2.8 → 4.2.9
Sign up to get free protection for your applications and to get access to all the features.
- package/CMakeLists.txt +1 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +139 -56
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +397 -424
- package/deps/couchbase-cxx-client/core/agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/agent_group.cxx +0 -1
- package/deps/couchbase-cxx-client/core/agent_group.hxx +9 -0
- package/deps/couchbase-cxx-client/core/agent_group_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/bucket.cxx +22 -8
- package/deps/couchbase-cxx-client/core/bucket.hxx +3 -1
- package/deps/couchbase-cxx-client/core/cluster.cxx +1453 -108
- package/deps/couchbase-cxx-client/core/cluster.hxx +183 -473
- package/deps/couchbase-cxx-client/core/cluster_agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/cluster_options.cxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +9 -8
- package/deps/couchbase-cxx-client/core/config_profiles.cxx +2 -2
- package/deps/couchbase-cxx-client/core/config_profiles.hxx +1 -1
- package/deps/couchbase-cxx-client/core/core_sdk_shim.cxx +1 -2
- package/deps/couchbase-cxx-client/core/core_sdk_shim.hxx +3 -2
- package/deps/couchbase-cxx-client/core/diagnostics.hxx +0 -1
- package/deps/couchbase-cxx-client/core/dispatcher.cxx +2 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +38 -76
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +40 -0
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +820 -0
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +403 -0
- package/deps/couchbase-cxx-client/core/impl/bucket.cxx +78 -0
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +433 -0
- package/deps/couchbase-cxx-client/core/impl/cluster.cxx +226 -44
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +1384 -0
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +306 -0
- package/deps/couchbase-cxx-client/core/impl/configuration_profiles_registry.cxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +2 -0
- package/deps/couchbase-cxx-client/core/{operations/mcbp_noop.cxx → impl/doc_id_query.cxx} +19 -15
- package/deps/couchbase-cxx-client/core/impl/key_value_error_category.cxx +4 -2
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +24 -17
- package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/query.cxx +45 -68
- package/deps/couchbase-cxx-client/core/impl/query.hxx +34 -0
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +628 -0
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +172 -0
- package/deps/couchbase-cxx-client/core/impl/search.cxx +12 -61
- package/deps/couchbase-cxx-client/core/impl/search.hxx +37 -0
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +469 -0
- package/deps/couchbase-cxx-client/core/impl/search_row_location.cxx +12 -0
- package/deps/couchbase-cxx-client/core/impl/search_sort_geo_distance.cxx +87 -0
- package/deps/couchbase-cxx-client/core/impl/with_legacy_durability.hxx +23 -25
- package/deps/couchbase-cxx-client/core/io/dns_config.cxx +28 -0
- package/deps/couchbase-cxx-client/core/io/dns_config.hxx +6 -25
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +1 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_message.hxx +3 -2
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +51 -21
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +2 -1
- package/deps/couchbase-cxx-client/core/logger/logger.hxx +4 -4
- package/deps/couchbase-cxx-client/core/management/bucket_settings.hxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/packet.cxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/queue_callback.hxx +1 -1
- package/deps/couchbase-cxx-client/core/meta/features.hxx +28 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.cxx +17 -1
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +6 -5
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +2 -2
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.cxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +260 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +146 -5
- package/deps/couchbase-cxx-client/core/origin.hxx +30 -140
- package/deps/couchbase-cxx-client/core/protocol/cmd_cluster_map_change_notification.hxx +3 -3
- package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +5 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_observe_seqno.hxx +4 -4
- package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +3 -0
- package/deps/couchbase-cxx-client/core/protocol/status.cxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
- package/deps/couchbase-cxx-client/core/query_context.hxx +11 -7
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +1 -1
- package/deps/couchbase-cxx-client/core/topology/configuration.cxx +23 -0
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +8 -12
- package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +3 -3
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +2 -0
- package/deps/couchbase-cxx-client/core/topology/error_map.hxx +2 -2
- package/deps/couchbase-cxx-client/core/topology/error_map_json.hxx +4 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.cxx +58 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +5 -40
- package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.cxx +30 -0
- package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +18 -18
- package/deps/couchbase-cxx-client/core/transactions/attempt_context.cxx +36 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +39 -41
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_cleanup_entry.hxx +3 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_entry.hxx +2 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.cxx +32 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.hxx +4 -30
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record_fmt.hxx +41 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/logging.hxx +17 -15
- package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +1 -13
- package/deps/couchbase-cxx-client/core/transactions/result.hxx +0 -26
- package/deps/couchbase-cxx-client/core/transactions/result_fmt.hxx +46 -0
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +6 -6
- package/deps/couchbase-cxx-client/core/transactions/transaction_keyspace.cxx +48 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_options.cxx +61 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +9 -8
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +9 -16
- package/deps/couchbase-cxx-client/core/transactions/transactions_config.cxx +7 -6
- package/deps/couchbase-cxx-client/core/transactions.hxx +6 -5
- package/deps/couchbase-cxx-client/core/utils/join_strings.hxx +4 -3
- package/deps/couchbase-cxx-client/core/utils/keyspace.hxx +4 -4
- package/deps/couchbase-cxx-client/couchbase/allow_querying_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_index_manager.hxx +463 -0
- package/deps/couchbase-cxx-client/couchbase/analyze_document_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/append_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/binary_collection.hxx +19 -115
- package/deps/couchbase-cxx-client/couchbase/bucket.hxx +13 -30
- package/deps/couchbase-cxx-client/couchbase/bucket_manager.hxx +8 -7
- package/deps/couchbase-cxx-client/couchbase/build_query_index_options.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +41 -73
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +1 -27
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +176 -386
- package/deps/couchbase-cxx-client/couchbase/collection_manager.hxx +8 -9
- package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +21 -24
- package/deps/couchbase-cxx-client/couchbase/connect_link_analytics_options.hxx +116 -0
- package/deps/couchbase-cxx-client/couchbase/create_bucket_options.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/create_collection_options.hxx +3 -2
- package/deps/couchbase-cxx-client/couchbase/create_dataset_analytics_options.hxx +120 -0
- package/deps/couchbase-cxx-client/couchbase/create_dataverse_analytics_options.hxx +85 -0
- package/deps/couchbase-cxx-client/couchbase/create_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/create_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/decrement_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/disallow_querying_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/disconnect_link_analytics_options.hxx +105 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataset_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataverse_analytics_options.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/drop_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/drop_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +22 -1
- package/deps/couchbase-cxx-client/couchbase/exists_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_error_map_attribute.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/transaction_keyspace.hxx +37 -0
- package/deps/couchbase-cxx-client/couchbase/freeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_datasets_analytics_options.hxx +66 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_indexes_analytics_options.hxx +65 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +1 -4
- package/deps/couchbase-cxx-client/couchbase/get_all_replicas_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_all_search_indexes_options.hxx +45 -0
- package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_any_replica_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_indexed_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +121 -0
- package/deps/couchbase-cxx-client/couchbase/get_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_pending_mutations_analytics_options.hxx +67 -0
- package/deps/couchbase-cxx-client/couchbase/get_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/increment_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/key_value_error_map_attribute.hxx +12 -0
- package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/management/analytics_dataset.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_index.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_link.hxx +239 -0
- package/deps/couchbase-cxx-client/couchbase/management/query_index.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/management/search_index.hxx +40 -0
- package/deps/couchbase-cxx-client/couchbase/manager_error_context.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/pause_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/phrase_query.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/prepend_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +99 -20
- package/deps/couchbase-cxx-client/couchbase/query_options.hxx +0 -21
- package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/replace_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/resume_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/scope.hxx +13 -45
- package/deps/couchbase-cxx-client/couchbase/search_facet_result.hxx +1 -7
- package/deps/couchbase-cxx-client/couchbase/search_geo_distance_units.hxx +26 -0
- package/deps/couchbase-cxx-client/couchbase/search_index_manager.hxx +292 -0
- package/deps/couchbase-cxx-client/couchbase/search_row_location.hxx +10 -0
- package/deps/couchbase-cxx-client/couchbase/search_sort_geo_distance.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/security_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +10 -7
- package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +10 -10
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +8 -58
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +28 -70
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +7 -2
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +11 -38
- package/deps/couchbase-cxx-client/couchbase/unfreeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_search_index_options.hxx +41 -0
- package/dist/binding.d.ts +7 -9
- package/dist/bindingutilities.js +2 -0
- package/dist/collection.js +3 -3
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +14 -2
- package/dist/transactions.d.ts +2 -0
- package/dist/transactions.js +2 -3
- package/dist/usermanager.js +1 -1
- package/package.json +7 -7
- package/src/binding.cpp +1 -0
- package/src/connection.cpp +12 -9
- package/src/connection.hpp +3 -3
- package/src/connection_autogen.cpp +7 -5
- package/src/constants.cpp +3 -0
- package/src/instance.cpp +2 -2
- package/src/instance.hpp +1 -1
- package/src/jstocbpp_autogen.hpp +21 -38
- package/src/jstocbpp_basic.hpp +2 -0
- package/src/jstocbpp_errors.hpp +1 -0
- package/src/jstocbpp_transactions.hpp +6 -22
- package/src/mutationtoken.hpp +1 -0
- package/tools/gen-bindings-json.py +39 -16
- package/deps/couchbase-cxx-client/core/impl/append.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/build_deferred_query_indexes.cxx +0 -157
- package/deps/couchbase-cxx-client/core/impl/create_bucket.cxx +0 -158
- package/deps/couchbase-cxx-client/core/impl/create_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/create_query_index.cxx +0 -232
- package/deps/couchbase-cxx-client/core/impl/create_scope.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/decrement.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/drop_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/drop_collection.cxx +0 -76
- package/deps/couchbase-cxx-client/core/impl/drop_query_index.cxx +0 -187
- package/deps/couchbase-cxx-client/core/impl/drop_scope.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/exists.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/flush_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/get.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/get_all_buckets.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/get_all_query_indexes.cxx +0 -106
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.cxx +0 -145
- package/deps/couchbase-cxx-client/core/impl/get_all_scopes.cxx +0 -94
- package/deps/couchbase-cxx-client/core/impl/get_and_lock.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_and_touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.cxx +0 -134
- package/deps/couchbase-cxx-client/core/impl/get_bucket.cxx +0 -168
- package/deps/couchbase-cxx-client/core/impl/increment.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/insert.cxx +0 -90
- package/deps/couchbase-cxx-client/core/impl/lookup_in.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.cxx +0 -169
- package/deps/couchbase-cxx-client/core/impl/mutate_in.cxx +0 -125
- package/deps/couchbase-cxx-client/core/impl/prepend.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/remove.cxx +0 -86
- package/deps/couchbase-cxx-client/core/impl/replace.cxx +0 -102
- package/deps/couchbase-cxx-client/core/impl/touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/unlock.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/update_bucket.cxx +0 -133
- package/deps/couchbase-cxx-client/core/impl/update_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/upsert.cxx +0 -100
- package/deps/couchbase-cxx-client/core/impl/watch_query_indexes.cxx +0 -196
- package/deps/couchbase-cxx-client/core/operations/mcbp_noop.hxx +0 -49
- /package/deps/couchbase-cxx-client/core/impl/{streaming_json_lexter_error_category.cxx → streaming_json_lexer_error_category.cxx} +0 -0
@@ -15,18 +15,54 @@
|
|
15
15
|
* limitations under the License.
|
16
16
|
*/
|
17
17
|
|
18
|
-
#include "cluster.hxx"
|
19
|
-
|
20
18
|
#include "couchbase/build_config.hxx"
|
21
19
|
|
20
|
+
#include "cluster.hxx"
|
21
|
+
|
22
|
+
#include "bucket.hxx"
|
23
|
+
#include "capella_ca.hxx"
|
24
|
+
#include "core/impl/get_replica.hxx"
|
25
|
+
#include "core/impl/lookup_in_replica.hxx"
|
26
|
+
#include "core/impl/observe_seqno.hxx"
|
27
|
+
#include "core/io/http_command.hxx"
|
28
|
+
#include "core/io/http_session_manager.hxx"
|
29
|
+
#include "core/io/mcbp_command.hxx"
|
30
|
+
#include "core/io/mcbp_session.hxx"
|
31
|
+
#include "core/management/analytics_link.hxx"
|
22
32
|
#include "core/mcbp/completion_token.hxx"
|
23
33
|
#include "core/mcbp/queue_request.hxx"
|
34
|
+
#include "core/metrics/logging_meter.hxx"
|
35
|
+
#include "core/metrics/noop_meter.hxx"
|
36
|
+
#include "core/operations.hxx"
|
37
|
+
#include "core/operations/management/analytics.hxx"
|
38
|
+
#include "core/operations/management/bucket.hxx"
|
39
|
+
#include "core/operations/management/bucket_describe.hxx"
|
40
|
+
#include "core/operations/management/cluster_describe.hxx"
|
41
|
+
#include "core/operations/management/cluster_developer_preview_enable.hxx"
|
42
|
+
#include "core/operations/management/collections.hxx"
|
43
|
+
#include "core/operations/management/eventing.hxx"
|
44
|
+
#include "core/operations/management/freeform.hxx"
|
45
|
+
#include "core/operations/management/query.hxx"
|
46
|
+
#include "core/operations/management/search.hxx"
|
47
|
+
#include "core/operations/management/user.hxx"
|
48
|
+
#include "core/operations/management/view.hxx"
|
49
|
+
#include "core/tracing/noop_tracer.hxx"
|
50
|
+
#include "core/tracing/threshold_logging_tracer.hxx"
|
51
|
+
#include "core/utils/join_strings.hxx"
|
52
|
+
#include "crud_component.hxx"
|
53
|
+
#include "dispatcher.hxx"
|
54
|
+
#include "impl/dns_srv_tracker.hxx"
|
55
|
+
#include "mozilla_ca_bundle.hxx"
|
24
56
|
#include "ping_collector.hxx"
|
25
57
|
#include "ping_reporter.hxx"
|
26
58
|
|
59
|
+
#include <asio/ssl.hpp>
|
60
|
+
#include <fstream>
|
61
|
+
#include <memory>
|
62
|
+
#include <thread>
|
63
|
+
|
27
64
|
namespace couchbase::core
|
28
65
|
{
|
29
|
-
|
30
66
|
class ping_collector_impl
|
31
67
|
: public std::enable_shared_from_this<ping_collector_impl>
|
32
68
|
, public diag::ping_reporter
|
@@ -44,7 +80,7 @@ class ping_collector_impl
|
|
44
80
|
{
|
45
81
|
}
|
46
82
|
|
47
|
-
~ping_collector_impl()
|
83
|
+
~ping_collector_impl() override
|
48
84
|
{
|
49
85
|
invoke_handler();
|
50
86
|
}
|
@@ -56,7 +92,7 @@ class ping_collector_impl
|
|
56
92
|
|
57
93
|
void report(diag::endpoint_ping_info&& info) override
|
58
94
|
{
|
59
|
-
std::scoped_lock lock(mutex_);
|
95
|
+
const std::scoped_lock lock(mutex_);
|
60
96
|
res_.services[info.type].emplace_back(std::move(info));
|
61
97
|
if (--expected_ == 0) {
|
62
98
|
invoke_handler();
|
@@ -78,143 +114,1452 @@ class ping_collector_impl
|
|
78
114
|
}
|
79
115
|
};
|
80
116
|
|
81
|
-
|
82
|
-
cluster::configure_tls_options(bool has_capella_host)
|
117
|
+
class cluster_impl : public std::enable_shared_from_this<cluster_impl>
|
83
118
|
{
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
asio::
|
88
|
-
|
89
|
-
|
90
|
-
asio::ssl::context::no_tlsv1_1; // published: 2006, deprecated: 2021
|
91
|
-
}
|
92
|
-
if (origin_.options().tls_disable_v1_2 || has_capella_host) {
|
93
|
-
tls_options |= asio::ssl::context::no_tlsv1_2; // published: 2008, still in use
|
119
|
+
public:
|
120
|
+
explicit cluster_impl(asio::io_context& ctx)
|
121
|
+
: ctx_(ctx)
|
122
|
+
, work_(asio::make_work_guard(ctx_))
|
123
|
+
, session_manager_(std::make_shared<io::http_session_manager>(id_, ctx_, tls_))
|
124
|
+
{
|
94
125
|
}
|
95
|
-
tls_.set_options(tls_options);
|
96
|
-
switch (origin_.options().tls_verify) {
|
97
|
-
case tls_verify_mode::none:
|
98
|
-
tls_.set_verify_mode(asio::ssl::verify_none);
|
99
|
-
break;
|
100
126
|
|
101
|
-
|
102
|
-
|
103
|
-
|
127
|
+
auto io_context() -> asio::io_context&
|
128
|
+
{
|
129
|
+
return ctx_;
|
104
130
|
}
|
105
131
|
|
132
|
+
void configure_tls_options(bool has_capella_host)
|
133
|
+
{
|
134
|
+
asio::ssl::context::options tls_options =
|
135
|
+
asio::ssl::context::default_workarounds | // various bug workarounds that should be rather harmless
|
136
|
+
asio::ssl::context::no_sslv2 | // published: 1995, deprecated: 2011
|
137
|
+
asio::ssl::context::no_sslv3; // published: 1996, deprecated: 2015
|
138
|
+
if (origin_.options().tls_disable_deprecated_protocols) {
|
139
|
+
tls_options |= asio::ssl::context::no_tlsv1 | // published: 1999, deprecated: 2021
|
140
|
+
asio::ssl::context::no_tlsv1_1; // published: 2006, deprecated: 2021
|
141
|
+
}
|
142
|
+
if (origin_.options().tls_disable_v1_2 || has_capella_host) {
|
143
|
+
tls_options |= asio::ssl::context::no_tlsv1_2; // published: 2008, still in use
|
144
|
+
}
|
145
|
+
tls_.set_options(tls_options);
|
146
|
+
switch (origin_.options().tls_verify) {
|
147
|
+
case tls_verify_mode::none:
|
148
|
+
tls_.set_verify_mode(asio::ssl::verify_none);
|
149
|
+
break;
|
150
|
+
|
151
|
+
case tls_verify_mode::peer:
|
152
|
+
tls_.set_verify_mode(asio::ssl::verify_peer);
|
153
|
+
break;
|
154
|
+
}
|
155
|
+
|
106
156
|
#ifdef COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
157
|
+
SSL_CTX_set_keylog_callback(tls_.native_handle(), [](const SSL* /* ssl */, const char* line) {
|
158
|
+
std::ofstream keylog(COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE, std::ios::out | std::ios::app | std::ios::binary);
|
159
|
+
keylog << std::string_view(line) << std::endl;
|
160
|
+
});
|
161
|
+
CB_LOG_CRITICAL(
|
162
|
+
"COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE was set to \"{}\" during build, all TLS keys will be logged for network analysis "
|
163
|
+
"(https://wiki.wireshark.org/TLS). DO NOT USE THIS BUILD IN PRODUCTION",
|
164
|
+
COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE);
|
115
165
|
#endif
|
116
|
-
}
|
166
|
+
}
|
117
167
|
|
118
|
-
void
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
{
|
124
|
-
|
125
|
-
|
168
|
+
void open(couchbase::core::origin origin, utils::movable_function<void(std::error_code)>&& handler)
|
169
|
+
{
|
170
|
+
if (stopped_) {
|
171
|
+
return handler(errc::network::cluster_closed);
|
172
|
+
}
|
173
|
+
if (origin.get_nodes().empty()) {
|
174
|
+
stopped_ = true;
|
175
|
+
work_.reset();
|
176
|
+
return handler(errc::common::invalid_argument);
|
177
|
+
}
|
178
|
+
|
179
|
+
origin_ = std::move(origin);
|
180
|
+
CB_LOG_DEBUG(R"(open cluster, id: "{}", core version: "{}", {})", id_, couchbase::core::meta::sdk_semver(), origin_.to_json());
|
181
|
+
// ignore the enable_tracing flag if a tracer was passed in
|
182
|
+
if (nullptr != origin_.options().tracer) {
|
183
|
+
tracer_ = origin_.options().tracer;
|
184
|
+
} else {
|
185
|
+
if (origin_.options().enable_tracing) {
|
186
|
+
tracer_ = std::make_shared<tracing::threshold_logging_tracer>(ctx_, origin_.options().tracing_options);
|
187
|
+
} else {
|
188
|
+
tracer_ = std::make_shared<tracing::noop_tracer>();
|
189
|
+
}
|
190
|
+
}
|
191
|
+
tracer_->start();
|
192
|
+
// ignore the metrics options if a meter was passed in.
|
193
|
+
if (nullptr != origin_.options().meter) {
|
194
|
+
meter_ = origin_.options().meter;
|
195
|
+
} else {
|
196
|
+
if (origin_.options().enable_metrics) {
|
197
|
+
meter_ = std::make_shared<metrics::logging_meter>(ctx_, origin_.options().metrics_options);
|
198
|
+
} else {
|
199
|
+
meter_ = std::make_shared<metrics::noop_meter>();
|
200
|
+
}
|
201
|
+
}
|
202
|
+
meter_->start();
|
203
|
+
session_manager_->set_tracer(tracer_);
|
204
|
+
if (origin_.options().enable_dns_srv) {
|
205
|
+
std::string hostname;
|
206
|
+
std::string port;
|
207
|
+
std::tie(hostname, port) = origin_.next_address();
|
208
|
+
dns_srv_tracker_ =
|
209
|
+
std::make_shared<impl::dns_srv_tracker>(ctx_, hostname, origin_.options().dns_config, origin_.options().enable_tls);
|
210
|
+
return asio::post(asio::bind_executor(
|
211
|
+
ctx_, [self = shared_from_this(), hostname = std::move(hostname), handler = std::move(handler)]() mutable {
|
212
|
+
return self->dns_srv_tracker_->get_srv_nodes([self, hostname = std::move(hostname), handler = std::move(handler)](
|
213
|
+
origin::node_list nodes, std::error_code ec) mutable {
|
214
|
+
if (ec) {
|
215
|
+
return self->close([ec, handler = std::move(handler)]() mutable { handler(ec); });
|
216
|
+
}
|
217
|
+
if (!nodes.empty()) {
|
218
|
+
self->origin_.set_nodes(std::move(nodes));
|
219
|
+
CB_LOG_INFO("replace list of bootstrap nodes with addresses from DNS SRV of \"{}\": [{}]",
|
220
|
+
hostname,
|
221
|
+
utils::join_strings(self->origin_.get_nodes(), ", "));
|
222
|
+
}
|
223
|
+
return self->do_open(std::move(handler));
|
224
|
+
});
|
225
|
+
}));
|
226
|
+
}
|
227
|
+
do_open(std::move(handler));
|
228
|
+
}
|
229
|
+
|
230
|
+
void open_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler)
|
231
|
+
{
|
232
|
+
if (stopped_) {
|
233
|
+
return handler(errc::network::cluster_closed);
|
234
|
+
}
|
235
|
+
std::shared_ptr<bucket> b{};
|
236
|
+
{
|
237
|
+
std::scoped_lock lock(buckets_mutex_);
|
238
|
+
auto ptr = buckets_.find(bucket_name);
|
239
|
+
if (ptr == buckets_.end()) {
|
240
|
+
std::vector<protocol::hello_feature> known_features;
|
241
|
+
if (session_ && session_->has_config()) {
|
242
|
+
known_features = session_->supported_features();
|
243
|
+
}
|
244
|
+
b = std::make_shared<bucket>(id_, ctx_, tls_, tracer_, meter_, bucket_name, origin_, known_features, dns_srv_tracker_);
|
245
|
+
buckets_.try_emplace(bucket_name, b);
|
246
|
+
}
|
247
|
+
}
|
248
|
+
if (b == nullptr) {
|
249
|
+
return handler({});
|
250
|
+
}
|
251
|
+
|
252
|
+
b->on_configuration_update(session_manager_);
|
253
|
+
b->bootstrap([self = shared_from_this(), bucket_name, handler = std::move(handler)](std::error_code ec,
|
254
|
+
const topology::configuration& config) mutable {
|
255
|
+
if (ec) {
|
256
|
+
std::scoped_lock lock(self->buckets_mutex_);
|
257
|
+
self->buckets_.erase(bucket_name);
|
258
|
+
} else if (self->session_ && !self->session_->supports_gcccp()) {
|
259
|
+
self->session_manager_->set_configuration(config, self->origin_.options());
|
260
|
+
}
|
261
|
+
handler(ec);
|
262
|
+
});
|
126
263
|
}
|
127
|
-
|
128
|
-
|
264
|
+
|
265
|
+
void close_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler)
|
266
|
+
{
|
267
|
+
if (stopped_) {
|
268
|
+
return handler(errc::network::cluster_closed);
|
269
|
+
}
|
270
|
+
std::shared_ptr<bucket> b{};
|
271
|
+
{
|
272
|
+
std::scoped_lock lock(buckets_mutex_);
|
273
|
+
|
274
|
+
if (auto ptr = buckets_.find(bucket_name); ptr != buckets_.end()) {
|
275
|
+
b = std::move(ptr->second);
|
276
|
+
buckets_.erase(ptr);
|
277
|
+
}
|
278
|
+
}
|
279
|
+
if (b != nullptr) {
|
280
|
+
b->close();
|
281
|
+
}
|
282
|
+
return handler({});
|
129
283
|
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
284
|
+
|
285
|
+
std::pair<std::error_code, couchbase::core::origin> origin() const
|
286
|
+
{
|
287
|
+
if (stopped_) {
|
288
|
+
return { errc::network::cluster_closed, {} };
|
289
|
+
}
|
290
|
+
return { {}, origin_ };
|
135
291
|
}
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
292
|
+
|
293
|
+
template<class Request,
|
294
|
+
class Handler,
|
295
|
+
typename std::enable_if_t<!std::is_same_v<typename Request::encoded_request_type, io::http_request>, int> = 0>
|
296
|
+
void execute(Request request, Handler&& handler)
|
297
|
+
{
|
298
|
+
using response_type = typename Request::encoded_response_type;
|
299
|
+
if (stopped_) {
|
300
|
+
return handler(request.make_response(make_key_value_error_context(errc::network::cluster_closed, request.id), response_type{}));
|
301
|
+
}
|
302
|
+
if (auto bucket = find_bucket_by_name(request.id.bucket()); bucket != nullptr) {
|
303
|
+
return bucket->execute(std::move(request), std::forward<Handler>(handler));
|
304
|
+
}
|
305
|
+
if (request.id.bucket().empty()) {
|
306
|
+
return handler(
|
307
|
+
request.make_response(make_key_value_error_context(errc::common::bucket_not_found, request.id), response_type{}));
|
308
|
+
}
|
309
|
+
auto bucket_name = request.id.bucket();
|
310
|
+
return open_bucket(
|
311
|
+
bucket_name,
|
312
|
+
[self = shared_from_this(), request = std::move(request), handler = std::forward<Handler>(handler)](std::error_code ec) mutable {
|
313
|
+
if (ec) {
|
314
|
+
return handler(request.make_response(make_key_value_error_context(ec, request.id), response_type{}));
|
315
|
+
}
|
316
|
+
return self->execute(std::move(request), std::forward<Handler>(handler));
|
317
|
+
});
|
318
|
+
}
|
319
|
+
|
320
|
+
template<class Request,
|
321
|
+
class Handler,
|
322
|
+
typename std::enable_if_t<std::is_same_v<typename Request::encoded_request_type, io::http_request>, int> = 0>
|
323
|
+
void execute(Request request, Handler&& handler)
|
324
|
+
{
|
325
|
+
using response_type = typename Request::encoded_response_type;
|
326
|
+
if (stopped_) {
|
327
|
+
return handler(request.make_response({ errc::network::cluster_closed }, response_type{}));
|
328
|
+
}
|
329
|
+
if constexpr (operations::is_compound_operation_v<Request>) {
|
330
|
+
return request.execute(shared_from_this(), std::forward<Handler>(handler));
|
331
|
+
} else {
|
332
|
+
return session_manager_->execute(std::move(request), std::forward<Handler>(handler), origin_.credentials());
|
333
|
+
}
|
334
|
+
}
|
335
|
+
|
336
|
+
std::shared_ptr<bucket> find_bucket_by_name(const std::string& name)
|
337
|
+
{
|
338
|
+
std::scoped_lock lock(buckets_mutex_);
|
339
|
+
|
340
|
+
auto bucket = buckets_.find(name);
|
341
|
+
if (bucket == buckets_.end()) {
|
342
|
+
return {};
|
343
|
+
}
|
344
|
+
return bucket->second;
|
345
|
+
}
|
346
|
+
|
347
|
+
void for_each_bucket(utils::movable_function<void(std::shared_ptr<bucket>)> handler)
|
348
|
+
{
|
349
|
+
std::vector<std::shared_ptr<bucket>> buckets{};
|
350
|
+
{
|
351
|
+
std::scoped_lock lock(buckets_mutex_);
|
352
|
+
buckets.reserve(buckets_.size());
|
353
|
+
for (const auto& [name, bucket] : buckets_) {
|
354
|
+
buckets.push_back(bucket);
|
355
|
+
}
|
356
|
+
}
|
357
|
+
for (auto bucket : buckets) {
|
358
|
+
handler(bucket);
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
void do_open(utils::movable_function<void(std::error_code)> handler)
|
363
|
+
{
|
364
|
+
// Warn users if idle_http_connection_timeout is too close to server idle timeouts
|
365
|
+
if (origin_.options().idle_http_connection_timeout > std::chrono::milliseconds(4'500)) {
|
366
|
+
CB_LOG_INFO("[{}]: The SDK may produce trivial warnings due to the idle HTTP connection timeout being set above the idle"
|
367
|
+
"timeout of various services",
|
368
|
+
id_);
|
369
|
+
}
|
370
|
+
|
371
|
+
// Warn users if they attempt to use Capella without TLS being enabled.
|
372
|
+
bool has_capella_host = false;
|
373
|
+
{
|
374
|
+
bool has_non_capella_host = false;
|
375
|
+
static std::string suffix = "cloud.couchbase.com";
|
376
|
+
for (const auto& node : origin_.get_hostnames()) {
|
377
|
+
if (auto pos = node.find(suffix); pos != std::string::npos && pos + suffix.size() == node.size()) {
|
378
|
+
has_capella_host = true;
|
379
|
+
} else {
|
380
|
+
has_non_capella_host = true;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
if (has_capella_host && !origin_.options().enable_tls) {
|
385
|
+
CB_LOG_WARNING("[{}]: TLS is required when connecting to Couchbase Capella. Please enable TLS by prefixing "
|
386
|
+
"the connection string with \"couchbases://\" (note the final 's').",
|
387
|
+
id_);
|
388
|
+
}
|
389
|
+
|
390
|
+
if (origin_.options().enable_tls /* TLS is enabled */
|
391
|
+
&& origin_.options().trust_certificate.empty() /* No CA certificate (or other SDK-specific trust source) is specified */
|
392
|
+
&& origin_.options().trust_certificate_value.empty() /* and certificate value has not been specified */
|
393
|
+
&& origin_.options().tls_verify != tls_verify_mode::none /* The user did not disable all TLS verification */
|
394
|
+
&& has_non_capella_host /* The connection string has a hostname that does NOT end in ".cloud.couchbase.com" */) {
|
395
|
+
CB_LOG_WARNING("[{}] When TLS is enabled, the cluster options must specify certificate(s) to trust or ensure that they are "
|
396
|
+
"available in system CA store. (Unless connecting to cloud.couchbase.com.)",
|
397
|
+
id_);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
if (origin_.options().enable_tls) {
|
402
|
+
configure_tls_options(has_capella_host);
|
403
|
+
|
404
|
+
if (origin_.options().trust_certificate.empty() &&
|
405
|
+
origin_.options().trust_certificate_value.empty()) { // trust certificate is not explicitly specified
|
406
|
+
CB_LOG_DEBUG(R"([{}]: use default CA for TLS verify)", id_);
|
407
|
+
std::error_code ec{};
|
408
|
+
|
409
|
+
// load system certificates
|
410
|
+
tls_.set_default_verify_paths(ec);
|
411
|
+
if (ec) {
|
412
|
+
CB_LOG_WARNING(R"([{}]: failed to load system CAs: {})", id_, ec.message());
|
413
|
+
}
|
414
|
+
|
415
|
+
// add the Capella Root CA in addition to system CAs
|
416
|
+
tls_.add_certificate_authority(
|
417
|
+
asio::const_buffer(couchbase::core::default_ca::capellaCaCert, strlen(couchbase::core::default_ca::capellaCaCert)), ec);
|
418
|
+
if (ec) {
|
419
|
+
CB_LOG_WARNING("[{}]: unable to load default CAs: {}", id_, ec.message());
|
420
|
+
// we don't consider this fatal and try to continue without it
|
421
|
+
}
|
422
|
+
|
423
|
+
if (const auto certificates = default_ca::mozilla_ca_certs();
|
424
|
+
!origin_.options().disable_mozilla_ca_certificates && !certificates.empty()) {
|
425
|
+
CB_LOG_DEBUG("[{}]: loading {} CA certificates from Mozilla bundle. Update date: \"{}\", SHA256: \"{}\"",
|
426
|
+
id_,
|
427
|
+
certificates.size(),
|
428
|
+
default_ca::mozilla_ca_certs_date(),
|
429
|
+
default_ca::mozilla_ca_certs_sha256());
|
430
|
+
for (const auto& cert : certificates) {
|
431
|
+
tls_.add_certificate_authority(asio::const_buffer(cert.body.data(), cert.body.size()), ec);
|
432
|
+
if (ec) {
|
433
|
+
CB_LOG_WARNING("[{}]: unable to load CA \"{}\" from Mozilla bundle: {}", id_, cert.authority, ec.message());
|
434
|
+
}
|
435
|
+
}
|
436
|
+
}
|
437
|
+
} else { // trust certificate is explicitly specified
|
438
|
+
std::error_code ec{};
|
439
|
+
// load only the explicit certificate
|
440
|
+
// system and default capella certificates are not loaded
|
441
|
+
if (!origin_.options().trust_certificate_value.empty()) {
|
442
|
+
CB_LOG_DEBUG(R"([{}]: use TLS certificate passed through via options object)", id_);
|
443
|
+
tls_.add_certificate_authority(asio::const_buffer(origin_.options().trust_certificate_value.data(),
|
444
|
+
origin_.options().trust_certificate_value.size()),
|
445
|
+
ec);
|
446
|
+
if (ec) {
|
447
|
+
CB_LOG_WARNING("[{}]: unable to load CA passed via options object: {}", id_, ec.message());
|
448
|
+
}
|
449
|
+
}
|
450
|
+
if (!origin_.options().trust_certificate.empty()) {
|
451
|
+
CB_LOG_DEBUG(R"([{}]: use TLS verify file: "{}")", id_, origin_.options().trust_certificate);
|
452
|
+
tls_.load_verify_file(origin_.options().trust_certificate, ec);
|
453
|
+
if (ec) {
|
454
|
+
CB_LOG_ERROR("[{}]: unable to load verify file \"{}\": {}", id_, origin_.options().trust_certificate, ec.message());
|
455
|
+
return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
if (origin_.credentials().uses_certificate()) {
|
460
|
+
std::error_code ec{};
|
461
|
+
CB_LOG_DEBUG(R"([{}]: use TLS certificate chain: "{}")", id_, origin_.certificate_path());
|
462
|
+
tls_.use_certificate_chain_file(origin_.certificate_path(), ec);
|
463
|
+
if (ec) {
|
464
|
+
CB_LOG_ERROR("[{}]: unable to load certificate chain \"{}\": {}", id_, origin_.certificate_path(), ec.message());
|
465
|
+
return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
|
466
|
+
}
|
467
|
+
CB_LOG_DEBUG(R"([{}]: use TLS private key: "{}")", id_, origin_.key_path());
|
468
|
+
tls_.use_private_key_file(origin_.key_path(), asio::ssl::context::file_format::pem, ec);
|
469
|
+
if (ec) {
|
470
|
+
CB_LOG_ERROR("[{}]: unable to load private key \"{}\": {}", id_, origin_.key_path(), ec.message());
|
471
|
+
return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
|
472
|
+
}
|
473
|
+
}
|
474
|
+
session_ = io::mcbp_session(id_, ctx_, tls_, origin_, dns_srv_tracker_);
|
475
|
+
} else {
|
476
|
+
session_ = io::mcbp_session(id_, ctx_, origin_, dns_srv_tracker_);
|
477
|
+
}
|
478
|
+
session_->bootstrap([self = shared_from_this(), handler = std::move(handler)](std::error_code ec,
|
479
|
+
const topology::configuration& config) mutable {
|
480
|
+
if (!ec) {
|
481
|
+
if (self->origin_.options().network == "auto") {
|
482
|
+
self->origin_.options().network = config.select_network(self->session_->bootstrap_hostname());
|
483
|
+
if (self->origin_.options().network == "default") {
|
484
|
+
CB_LOG_DEBUG(R"({} detected network is "{}")", self->session_->log_prefix(), self->origin_.options().network);
|
485
|
+
} else {
|
486
|
+
CB_LOG_INFO(R"({} detected network is "{}")", self->session_->log_prefix(), self->origin_.options().network);
|
487
|
+
}
|
488
|
+
}
|
489
|
+
if (self->origin_.options().network != "default") {
|
490
|
+
origin::node_list nodes;
|
491
|
+
nodes.reserve(config.nodes.size());
|
492
|
+
for (const auto& address : config.nodes) {
|
493
|
+
auto port =
|
494
|
+
address.port_or(self->origin_.options().network, service_type::key_value, self->origin_.options().enable_tls, 0);
|
495
|
+
if (port == 0) {
|
496
|
+
continue;
|
497
|
+
}
|
498
|
+
origin::node_entry node;
|
499
|
+
node.first = address.hostname_for(self->origin_.options().network);
|
500
|
+
node.second = std::to_string(port);
|
501
|
+
nodes.emplace_back(node);
|
502
|
+
}
|
503
|
+
self->origin_.set_nodes(nodes);
|
504
|
+
CB_LOG_INFO("replace list of bootstrap nodes with addresses of alternative network \"{}\": [{}]",
|
505
|
+
self->origin_.options().network,
|
506
|
+
utils::join_strings(self->origin_.get_nodes(), ","));
|
507
|
+
}
|
508
|
+
self->session_manager_->set_configuration(config, self->origin_.options());
|
509
|
+
self->session_->on_configuration_update(self->session_manager_);
|
510
|
+
self->session_->on_stop([self]() {
|
511
|
+
if (self->session_) {
|
512
|
+
self->session_.reset();
|
513
|
+
}
|
514
|
+
});
|
515
|
+
}
|
516
|
+
if (ec) {
|
517
|
+
return self->close([ec, handler = std::move(handler)]() mutable { handler(ec); });
|
518
|
+
}
|
519
|
+
handler(ec);
|
520
|
+
});
|
521
|
+
}
|
522
|
+
|
523
|
+
void with_bucket_configuration(const std::string& bucket_name,
|
524
|
+
utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
|
525
|
+
{
|
526
|
+
if (stopped_) {
|
527
|
+
return handler(errc::network::cluster_closed, {});
|
528
|
+
}
|
529
|
+
if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
|
530
|
+
return bucket->with_configuration(std::move(handler));
|
531
|
+
}
|
532
|
+
return handler(errc::common::bucket_not_found, {});
|
533
|
+
}
|
534
|
+
|
535
|
+
void ping(std::optional<std::string> report_id,
|
536
|
+
std::optional<std::string> bucket_name,
|
537
|
+
std::set<service_type> services,
|
538
|
+
std::optional<std::chrono::milliseconds> timeout,
|
539
|
+
utils::movable_function<void(diag::ping_result)> handler)
|
540
|
+
{
|
541
|
+
if (!report_id) {
|
542
|
+
report_id = std::make_optional(uuid::to_string(uuid::random()));
|
543
|
+
}
|
544
|
+
if (stopped_) {
|
545
|
+
return handler({ report_id.value(), meta::sdk_id() });
|
546
|
+
}
|
547
|
+
if (services.empty()) {
|
548
|
+
services = {
|
549
|
+
service_type::key_value, service_type::view, service_type::query, service_type::search,
|
550
|
+
service_type::analytics, service_type::management, service_type::eventing,
|
551
|
+
};
|
552
|
+
}
|
553
|
+
asio::post(asio::bind_executor(
|
554
|
+
ctx_, [cluster = shared_from_this(), report_id, bucket_name, services, timeout, handler = std::move(handler)]() mutable {
|
555
|
+
auto collector = std::make_shared<ping_collector_impl>(report_id.value(), std::move(handler));
|
556
|
+
if (bucket_name) {
|
557
|
+
if (services.find(service_type::key_value) != services.end()) {
|
558
|
+
if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
|
559
|
+
return bucket->ping(collector, timeout);
|
560
|
+
}
|
561
|
+
cluster->open_bucket(bucket_name.value(), [collector, cluster, bucket_name, timeout](std::error_code ec) {
|
562
|
+
if (!ec) {
|
563
|
+
if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
|
564
|
+
return bucket->ping(collector, timeout);
|
565
|
+
}
|
148
566
|
}
|
567
|
+
});
|
568
|
+
}
|
569
|
+
} else {
|
570
|
+
if (services.find(service_type::key_value) != services.end()) {
|
571
|
+
if (cluster->session_) {
|
572
|
+
cluster->session_->ping(collector->build_reporter(), timeout);
|
149
573
|
}
|
150
|
-
|
151
|
-
}
|
152
|
-
} else {
|
153
|
-
if (services.find(service_type::key_value) != services.end()) {
|
154
|
-
if (cluster->session_) {
|
155
|
-
cluster->session_->ping(collector->build_reporter());
|
574
|
+
cluster->for_each_bucket([&collector, &timeout](auto bucket) { bucket->ping(collector, timeout); });
|
156
575
|
}
|
157
|
-
cluster->
|
576
|
+
cluster->session_manager_->ping(services, timeout, collector, cluster->origin_.credentials());
|
158
577
|
}
|
159
|
-
|
160
|
-
|
161
|
-
}));
|
162
|
-
}
|
578
|
+
}));
|
579
|
+
}
|
163
580
|
|
164
|
-
std::
|
165
|
-
|
166
|
-
{
|
167
|
-
|
581
|
+
void diagnostics(std::optional<std::string> report_id, utils::movable_function<void(diag::diagnostics_result)>&& handler)
|
582
|
+
{
|
583
|
+
if (!report_id) {
|
584
|
+
report_id = std::make_optional(uuid::to_string(uuid::random()));
|
585
|
+
}
|
586
|
+
if (stopped_) {
|
587
|
+
return handler({ report_id.value(), couchbase::core::meta::sdk_id() });
|
588
|
+
}
|
589
|
+
asio::post(asio::bind_executor(ctx_, [self = shared_from_this(), report_id, handler = std::move(handler)]() mutable {
|
590
|
+
diag::diagnostics_result res{ report_id.value(), couchbase::core::meta::sdk_id() };
|
591
|
+
if (self->session_) {
|
592
|
+
res.services[service_type::key_value].emplace_back(self->session_->diag_info());
|
593
|
+
}
|
594
|
+
self->for_each_bucket([&res](const auto& bucket) { bucket->export_diag_info(res); });
|
595
|
+
self->session_manager_->export_diag_info(res);
|
596
|
+
handler(std::move(res));
|
597
|
+
}));
|
598
|
+
}
|
599
|
+
|
600
|
+
void close(utils::movable_function<void()>&& handler)
|
601
|
+
{
|
602
|
+
if (stopped_) {
|
603
|
+
return handler();
|
604
|
+
}
|
605
|
+
stopped_ = true;
|
606
|
+
asio::post(asio::bind_executor(ctx_, [self = shared_from_this(), handler = std::move(handler)]() mutable {
|
607
|
+
if (self->session_) {
|
608
|
+
self->session_->stop(retry_reason::do_not_retry);
|
609
|
+
self->session_.reset();
|
610
|
+
}
|
611
|
+
self->for_each_bucket([](auto bucket) { bucket->close(); });
|
612
|
+
self->session_manager_->close();
|
613
|
+
handler();
|
614
|
+
self->work_.reset();
|
615
|
+
if (self->tracer_) {
|
616
|
+
self->tracer_->stop();
|
617
|
+
}
|
618
|
+
self->tracer_.reset();
|
619
|
+
if (self->meter_) {
|
620
|
+
self->meter_->stop();
|
621
|
+
}
|
622
|
+
self->meter_.reset();
|
623
|
+
}));
|
624
|
+
}
|
625
|
+
|
626
|
+
auto direct_dispatch(const std::string& bucket_name, std::shared_ptr<couchbase::core::mcbp::queue_request> req) -> std::error_code
|
627
|
+
{
|
628
|
+
if (stopped_) {
|
629
|
+
return errc::network::cluster_closed;
|
630
|
+
}
|
631
|
+
if (bucket_name.empty()) {
|
632
|
+
return errc::common::invalid_argument;
|
633
|
+
}
|
634
|
+
if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
|
635
|
+
return bucket->direct_dispatch(std::move(req));
|
636
|
+
}
|
637
|
+
|
638
|
+
open_bucket(bucket_name, [self = shared_from_this(), req = std::move(req), bucket_name](std::error_code ec) mutable {
|
639
|
+
if (ec) {
|
640
|
+
return req->cancel(ec);
|
641
|
+
}
|
642
|
+
self->direct_dispatch(bucket_name, std::move(req));
|
643
|
+
});
|
644
|
+
return {};
|
645
|
+
}
|
646
|
+
|
647
|
+
auto direct_re_queue(const std::string& bucket_name, std::shared_ptr<mcbp::queue_request> req, bool is_retry) -> std::error_code
|
648
|
+
{
|
649
|
+
if (stopped_) {
|
650
|
+
return errc::network::cluster_closed;
|
651
|
+
}
|
652
|
+
if (bucket_name.empty()) {
|
653
|
+
return errc::common::invalid_argument;
|
654
|
+
}
|
655
|
+
if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
|
656
|
+
return bucket->direct_re_queue(std::move(req), is_retry);
|
657
|
+
}
|
168
658
|
|
169
|
-
|
170
|
-
|
659
|
+
open_bucket(bucket_name, [self = shared_from_this(), bucket_name, req = std::move(req), is_retry](std::error_code ec) mutable {
|
660
|
+
if (ec) {
|
661
|
+
return req->cancel(ec);
|
662
|
+
}
|
663
|
+
self->direct_re_queue(bucket_name, std::move(req), is_retry);
|
664
|
+
});
|
171
665
|
return {};
|
172
666
|
}
|
173
|
-
|
667
|
+
|
668
|
+
private:
|
669
|
+
std::string id_{ uuid::to_string(uuid::random()) };
|
670
|
+
asio::io_context& ctx_;
|
671
|
+
asio::executor_work_guard<asio::io_context::executor_type> work_;
|
672
|
+
asio::ssl::context tls_{ asio::ssl::context::tls_client };
|
673
|
+
std::shared_ptr<io::http_session_manager> session_manager_;
|
674
|
+
std::optional<io::mcbp_session> session_{};
|
675
|
+
std::shared_ptr<impl::dns_srv_tracker> dns_srv_tracker_{};
|
676
|
+
std::mutex buckets_mutex_{};
|
677
|
+
std::map<std::string, std::shared_ptr<bucket>> buckets_{};
|
678
|
+
couchbase::core::origin origin_{};
|
679
|
+
std::shared_ptr<couchbase::tracing::request_tracer> tracer_{ nullptr };
|
680
|
+
std::shared_ptr<couchbase::metrics::meter> meter_{ nullptr };
|
681
|
+
std::atomic_bool stopped_{ false };
|
682
|
+
};
|
683
|
+
|
684
|
+
cluster::cluster(asio::io_context& ctx)
|
685
|
+
: impl_{ std::make_shared<cluster_impl>(ctx) }
|
686
|
+
{
|
687
|
+
}
|
688
|
+
|
689
|
+
auto
|
690
|
+
cluster::direct_dispatch(const std::string& bucket_name, std::shared_ptr<couchbase::core::mcbp::queue_request> req) const -> std::error_code
|
691
|
+
{
|
692
|
+
if (impl_) {
|
693
|
+
return impl_->direct_dispatch(bucket_name, std::move(req));
|
694
|
+
}
|
695
|
+
return errc::network::cluster_closed;
|
174
696
|
}
|
175
697
|
|
176
698
|
auto
|
177
|
-
cluster::
|
699
|
+
cluster::direct_re_queue(const std::string& bucket_name, std::shared_ptr<mcbp::queue_request> req, bool is_retry) const -> std::error_code
|
178
700
|
{
|
179
|
-
if (
|
180
|
-
return
|
701
|
+
if (impl_) {
|
702
|
+
return impl_->direct_re_queue(bucket_name, std::move(req), is_retry);
|
181
703
|
}
|
182
|
-
|
183
|
-
|
704
|
+
return errc::network::cluster_closed;
|
705
|
+
}
|
706
|
+
|
707
|
+
void
|
708
|
+
cluster::close(utils::movable_function<void()>&& handler) const
|
709
|
+
{
|
710
|
+
if (impl_) {
|
711
|
+
impl_->close(std::move(handler));
|
184
712
|
}
|
185
|
-
|
186
|
-
|
713
|
+
}
|
714
|
+
|
715
|
+
void
|
716
|
+
cluster::open_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler) const
|
717
|
+
{
|
718
|
+
if (impl_) {
|
719
|
+
impl_->open_bucket(bucket_name, std::move(handler));
|
187
720
|
}
|
721
|
+
}
|
188
722
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
}
|
195
|
-
return {};
|
723
|
+
void
|
724
|
+
cluster::open(couchbase::core::origin origin, utils::movable_function<void(std::error_code)>&& handler) const
|
725
|
+
{
|
726
|
+
if (impl_) {
|
727
|
+
impl_->open(std::move(origin), std::move(handler));
|
728
|
+
}
|
196
729
|
}
|
197
730
|
|
198
|
-
|
199
|
-
cluster::
|
731
|
+
void
|
732
|
+
cluster::diagnostics(std::optional<std::string> report_id, utils::movable_function<void(diag::diagnostics_result)>&& handler) const
|
200
733
|
{
|
201
|
-
if (
|
202
|
-
|
734
|
+
if (impl_) {
|
735
|
+
impl_->diagnostics(std::move(report_id), std::move(handler));
|
203
736
|
}
|
204
|
-
|
205
|
-
|
737
|
+
}
|
738
|
+
|
739
|
+
void
|
740
|
+
cluster::ping(std::optional<std::string> report_id,
|
741
|
+
std::optional<std::string> bucket_name,
|
742
|
+
std::set<service_type> services,
|
743
|
+
std::optional<std::chrono::milliseconds> timeout,
|
744
|
+
utils::movable_function<void(diag::ping_result)>&& handler) const
|
745
|
+
{
|
746
|
+
if (impl_) {
|
747
|
+
impl_->ping(std::move(report_id), std::move(bucket_name), std::move(services), std::move(timeout), std::move(handler));
|
206
748
|
}
|
207
|
-
|
208
|
-
|
749
|
+
}
|
750
|
+
|
751
|
+
void
|
752
|
+
cluster::with_bucket_configuration(const std::string& bucket_name,
|
753
|
+
utils::movable_function<void(std::error_code, topology::configuration)>&& handler) const
|
754
|
+
{
|
755
|
+
if (impl_) {
|
756
|
+
impl_->with_bucket_configuration(bucket_name, std::move(handler));
|
209
757
|
}
|
758
|
+
}
|
210
759
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
}
|
217
|
-
|
760
|
+
void
|
761
|
+
cluster::close_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler) const
|
762
|
+
{
|
763
|
+
if (impl_) {
|
764
|
+
impl_->close_bucket(bucket_name, std::move(handler));
|
765
|
+
}
|
766
|
+
}
|
767
|
+
|
768
|
+
std::pair<std::error_code, couchbase::core::origin>
|
769
|
+
cluster::origin() const
|
770
|
+
{
|
771
|
+
if (impl_) {
|
772
|
+
return impl_->origin();
|
773
|
+
}
|
774
|
+
return { errc::network::cluster_closed, {} };
|
775
|
+
}
|
776
|
+
|
777
|
+
auto
|
778
|
+
cluster::io_context() const -> asio::io_context&
|
779
|
+
{
|
780
|
+
return impl_->io_context();
|
781
|
+
}
|
782
|
+
|
783
|
+
void
|
784
|
+
cluster::execute(operations::append_request request, utils::movable_function<void(operations::append_response)>&& handler) const
|
785
|
+
{
|
786
|
+
return impl_->execute(std::move(request), std::move(handler));
|
787
|
+
}
|
788
|
+
|
789
|
+
void
|
790
|
+
cluster::execute(operations::decrement_request request, utils::movable_function<void(operations::decrement_response)>&& handler) const
|
791
|
+
{
|
792
|
+
return impl_->execute(std::move(request), std::move(handler));
|
793
|
+
}
|
794
|
+
|
795
|
+
void
|
796
|
+
cluster::execute(operations::exists_request request, utils::movable_function<void(operations::exists_response)>&& handler) const
|
797
|
+
{
|
798
|
+
return impl_->execute(std::move(request), std::move(handler));
|
799
|
+
}
|
800
|
+
|
801
|
+
void
|
802
|
+
cluster::execute(operations::get_request request, utils::movable_function<void(operations::get_response)>&& handler) const
|
803
|
+
{
|
804
|
+
return impl_->execute(std::move(request), std::move(handler));
|
805
|
+
}
|
806
|
+
|
807
|
+
void
|
808
|
+
cluster::execute(operations::get_all_replicas_request request,
|
809
|
+
utils::movable_function<void(operations::get_all_replicas_response)>&& handler) const
|
810
|
+
{
|
811
|
+
return request.execute(impl_, std::move(handler));
|
812
|
+
}
|
813
|
+
|
814
|
+
void
|
815
|
+
cluster::execute(operations::get_and_lock_request request, utils::movable_function<void(operations::get_and_lock_response)>&& handler) const
|
816
|
+
{
|
817
|
+
return impl_->execute(std::move(request), std::move(handler));
|
818
|
+
}
|
819
|
+
|
820
|
+
void
|
821
|
+
cluster::execute(operations::get_and_touch_request request,
|
822
|
+
utils::movable_function<void(operations::get_and_touch_response)>&& handler) const
|
823
|
+
{
|
824
|
+
return impl_->execute(std::move(request), std::move(handler));
|
825
|
+
}
|
826
|
+
|
827
|
+
void
|
828
|
+
cluster::execute(operations::get_any_replica_request request,
|
829
|
+
utils::movable_function<void(operations::get_any_replica_response)>&& handler) const
|
830
|
+
{
|
831
|
+
return request.execute(impl_, std::move(handler));
|
832
|
+
}
|
833
|
+
|
834
|
+
void
|
835
|
+
cluster::execute(operations::get_projected_request request,
|
836
|
+
utils::movable_function<void(operations::get_projected_response)>&& handler) const
|
837
|
+
{
|
838
|
+
return impl_->execute(std::move(request), std::move(handler));
|
839
|
+
}
|
840
|
+
|
841
|
+
void
|
842
|
+
cluster::execute(operations::increment_request request, utils::movable_function<void(operations::increment_response)>&& handler) const
|
843
|
+
{
|
844
|
+
return impl_->execute(std::move(request), std::move(handler));
|
845
|
+
}
|
846
|
+
|
847
|
+
void
|
848
|
+
cluster::execute(operations::insert_request request, utils::movable_function<void(operations::insert_response)>&& handler) const
|
849
|
+
{
|
850
|
+
return impl_->execute(std::move(request), std::move(handler));
|
851
|
+
}
|
852
|
+
|
853
|
+
void
|
854
|
+
cluster::execute(operations::lookup_in_request request, utils::movable_function<void(operations::lookup_in_response)>&& handler) const
|
855
|
+
{
|
856
|
+
return impl_->execute(std::move(request), std::move(handler));
|
857
|
+
}
|
858
|
+
|
859
|
+
void
|
860
|
+
cluster::execute(operations::lookup_in_any_replica_request request,
|
861
|
+
utils::movable_function<void(operations::lookup_in_any_replica_response)>&& handler) const
|
862
|
+
{
|
863
|
+
return request.execute(impl_, std::move(handler));
|
864
|
+
}
|
865
|
+
|
866
|
+
void
|
867
|
+
cluster::execute(operations::lookup_in_all_replicas_request request,
|
868
|
+
utils::movable_function<void(operations::lookup_in_all_replicas_response)>&& handler) const
|
869
|
+
{
|
870
|
+
return request.execute(impl_, std::move(handler));
|
871
|
+
}
|
872
|
+
|
873
|
+
void
|
874
|
+
cluster::execute(operations::mutate_in_request request, utils::movable_function<void(operations::mutate_in_response)>&& handler) const
|
875
|
+
{
|
876
|
+
return impl_->execute(std::move(request), std::move(handler));
|
877
|
+
}
|
878
|
+
|
879
|
+
void
|
880
|
+
cluster::execute(operations::prepend_request request, utils::movable_function<void(operations::prepend_response)>&& handler) const
|
881
|
+
{
|
882
|
+
return impl_->execute(std::move(request), std::move(handler));
|
883
|
+
}
|
884
|
+
|
885
|
+
void
|
886
|
+
cluster::execute(operations::query_request request, utils::movable_function<void(operations::query_response)>&& handler) const
|
887
|
+
{
|
888
|
+
return impl_->execute(std::move(request), std::move(handler));
|
889
|
+
}
|
890
|
+
|
891
|
+
void
|
892
|
+
cluster::execute(operations::remove_request request, utils::movable_function<void(operations::remove_response)>&& handler) const
|
893
|
+
{
|
894
|
+
return impl_->execute(std::move(request), std::move(handler));
|
895
|
+
}
|
896
|
+
|
897
|
+
void
|
898
|
+
cluster::execute(operations::replace_request request, utils::movable_function<void(operations::replace_response)>&& handler) const
|
899
|
+
{
|
900
|
+
return impl_->execute(std::move(request), std::move(handler));
|
901
|
+
}
|
902
|
+
|
903
|
+
void
|
904
|
+
cluster::execute(operations::search_request request, utils::movable_function<void(operations::search_response)>&& handler) const
|
905
|
+
{
|
906
|
+
return impl_->execute(std::move(request), std::move(handler));
|
907
|
+
}
|
908
|
+
|
909
|
+
void
|
910
|
+
cluster::execute(operations::touch_request request, utils::movable_function<void(operations::touch_response)>&& handler) const
|
911
|
+
{
|
912
|
+
return impl_->execute(std::move(request), std::move(handler));
|
913
|
+
}
|
914
|
+
|
915
|
+
void
|
916
|
+
cluster::execute(operations::unlock_request request, utils::movable_function<void(operations::unlock_response)>&& handler) const
|
917
|
+
{
|
918
|
+
return impl_->execute(std::move(request), std::move(handler));
|
218
919
|
}
|
219
920
|
|
921
|
+
void
|
922
|
+
cluster::execute(operations::upsert_request request, utils::movable_function<void(operations::upsert_response)>&& handler) const
|
923
|
+
{
|
924
|
+
return impl_->execute(std::move(request), std::move(handler));
|
925
|
+
}
|
926
|
+
|
927
|
+
void
|
928
|
+
cluster::execute(operations::document_view_request request,
|
929
|
+
utils::movable_function<void(operations::document_view_response)>&& handler) const
|
930
|
+
{
|
931
|
+
return impl_->execute(std::move(request), std::move(handler));
|
932
|
+
}
|
933
|
+
|
934
|
+
void
|
935
|
+
cluster::execute(operations::http_noop_request request, utils::movable_function<void(operations::http_noop_response)>&& handler) const
|
936
|
+
{
|
937
|
+
return impl_->execute(std::move(request), std::move(handler));
|
938
|
+
}
|
939
|
+
|
940
|
+
void
|
941
|
+
cluster::execute(operations::management::analytics_dataset_create_request request,
|
942
|
+
utils::movable_function<void(operations::management::analytics_dataset_create_response)>&& handler) const
|
943
|
+
{
|
944
|
+
return impl_->execute(std::move(request), std::move(handler));
|
945
|
+
}
|
946
|
+
|
947
|
+
void
|
948
|
+
cluster::execute(operations::management::analytics_dataset_drop_request request,
|
949
|
+
utils::movable_function<void(operations::management::analytics_dataset_drop_response)>&& handler) const
|
950
|
+
{
|
951
|
+
return impl_->execute(std::move(request), std::move(handler));
|
952
|
+
}
|
953
|
+
|
954
|
+
void
|
955
|
+
cluster::execute(operations::management::analytics_dataset_get_all_request request,
|
956
|
+
utils::movable_function<void(operations::management::analytics_dataset_get_all_response)>&& handler) const
|
957
|
+
{
|
958
|
+
return impl_->execute(std::move(request), std::move(handler));
|
959
|
+
}
|
960
|
+
|
961
|
+
void
|
962
|
+
cluster::execute(operations::management::analytics_dataverse_create_request request,
|
963
|
+
utils::movable_function<void(operations::management::analytics_dataverse_create_response)>&& handler) const
|
964
|
+
{
|
965
|
+
return impl_->execute(std::move(request), std::move(handler));
|
966
|
+
}
|
967
|
+
|
968
|
+
void
|
969
|
+
cluster::execute(operations::management::analytics_dataverse_drop_request request,
|
970
|
+
utils::movable_function<void(operations::management::analytics_dataverse_drop_response)>&& handler) const
|
971
|
+
{
|
972
|
+
return impl_->execute(std::move(request), std::move(handler));
|
973
|
+
}
|
974
|
+
|
975
|
+
void
|
976
|
+
cluster::execute(operations::management::analytics_get_pending_mutations_request request,
|
977
|
+
utils::movable_function<void(operations::management::analytics_get_pending_mutations_response)>&& handler) const
|
978
|
+
{
|
979
|
+
return impl_->execute(std::move(request), std::move(handler));
|
980
|
+
}
|
981
|
+
|
982
|
+
void
|
983
|
+
cluster::execute(operations::management::analytics_index_create_request request,
|
984
|
+
utils::movable_function<void(operations::management::analytics_index_create_response)>&& handler) const
|
985
|
+
{
|
986
|
+
return impl_->execute(std::move(request), std::move(handler));
|
987
|
+
}
|
988
|
+
|
989
|
+
void
|
990
|
+
cluster::execute(operations::management::analytics_index_drop_request request,
|
991
|
+
utils::movable_function<void(operations::management::analytics_index_drop_response)>&& handler) const
|
992
|
+
{
|
993
|
+
return impl_->execute(std::move(request), std::move(handler));
|
994
|
+
}
|
995
|
+
|
996
|
+
void
|
997
|
+
cluster::execute(operations::management::analytics_index_get_all_request request,
|
998
|
+
utils::movable_function<void(operations::management::analytics_index_get_all_response)>&& handler) const
|
999
|
+
{
|
1000
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
void
|
1004
|
+
cluster::execute(operations::management::analytics_link_connect_request request,
|
1005
|
+
utils::movable_function<void(operations::management::analytics_link_connect_response)>&& handler) const
|
1006
|
+
{
|
1007
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
void
|
1011
|
+
cluster::execute(operations::management::analytics_link_disconnect_request request,
|
1012
|
+
utils::movable_function<void(operations::management::analytics_link_disconnect_response)>&& handler) const
|
1013
|
+
{
|
1014
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
void
|
1018
|
+
cluster::execute(operations::management::analytics_link_drop_request request,
|
1019
|
+
utils::movable_function<void(operations::management::analytics_link_drop_response)>&& handler) const
|
1020
|
+
{
|
1021
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
void
|
1025
|
+
cluster::execute(operations::management::analytics_link_get_all_request request,
|
1026
|
+
utils::movable_function<void(operations::management::analytics_link_get_all_response)>&& handler) const
|
1027
|
+
{
|
1028
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1029
|
+
}
|
1030
|
+
|
1031
|
+
void
|
1032
|
+
cluster::execute(operations::management::bucket_create_request request,
|
1033
|
+
utils::movable_function<void(operations::management::bucket_create_response)>&& handler) const
|
1034
|
+
{
|
1035
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
void
|
1039
|
+
cluster::execute(operations::management::bucket_drop_request request,
|
1040
|
+
utils::movable_function<void(operations::management::bucket_drop_response)>&& handler) const
|
1041
|
+
{
|
1042
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
void
|
1046
|
+
cluster::execute(operations::management::bucket_flush_request request,
|
1047
|
+
utils::movable_function<void(operations::management::bucket_flush_response)>&& handler) const
|
1048
|
+
{
|
1049
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
void
|
1053
|
+
cluster::execute(operations::management::bucket_get_request request,
|
1054
|
+
utils::movable_function<void(operations::management::bucket_get_response)>&& handler) const
|
1055
|
+
{
|
1056
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
void
|
1060
|
+
cluster::execute(operations::management::bucket_get_all_request request,
|
1061
|
+
utils::movable_function<void(operations::management::bucket_get_all_response)>&& handler) const
|
1062
|
+
{
|
1063
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
void
|
1067
|
+
cluster::execute(operations::management::bucket_update_request request,
|
1068
|
+
utils::movable_function<void(operations::management::bucket_update_response)>&& handler) const
|
1069
|
+
{
|
1070
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
void
|
1074
|
+
cluster::execute(operations::management::collection_create_request request,
|
1075
|
+
utils::movable_function<void(operations::management::collection_create_response)>&& handler) const
|
1076
|
+
{
|
1077
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
void
|
1081
|
+
cluster::execute(operations::management::collection_update_request request,
|
1082
|
+
utils::movable_function<void(operations::management::collection_update_response)>&& handler) const
|
1083
|
+
{
|
1084
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
void
|
1088
|
+
cluster::execute(operations::management::collection_drop_request request,
|
1089
|
+
utils::movable_function<void(operations::management::collection_drop_response)>&& handler) const
|
1090
|
+
{
|
1091
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
void
|
1095
|
+
cluster::execute(operations::management::collections_manifest_get_request request,
|
1096
|
+
utils::movable_function<void(operations::management::collections_manifest_get_response)>&& handler) const
|
1097
|
+
{
|
1098
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
void
|
1102
|
+
cluster::execute(operations::management::scope_create_request request,
|
1103
|
+
utils::movable_function<void(operations::management::scope_create_response)>&& handler) const
|
1104
|
+
{
|
1105
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
void
|
1109
|
+
cluster::execute(operations::management::scope_drop_request request,
|
1110
|
+
utils::movable_function<void(operations::management::scope_drop_response)>&& handler) const
|
1111
|
+
{
|
1112
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
void
|
1116
|
+
cluster::execute(operations::management::scope_get_all_request request,
|
1117
|
+
utils::movable_function<void(operations::management::scope_get_all_response)>&& handler) const
|
1118
|
+
{
|
1119
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
void
|
1123
|
+
cluster::execute(operations::management::eventing_deploy_function_request request,
|
1124
|
+
utils::movable_function<void(operations::management::eventing_deploy_function_response)>&& handler) const
|
1125
|
+
{
|
1126
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
void
|
1130
|
+
cluster::execute(operations::management::eventing_drop_function_request request,
|
1131
|
+
utils::movable_function<void(operations::management::eventing_drop_function_response)>&& handler) const
|
1132
|
+
{
|
1133
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
void
|
1137
|
+
cluster::execute(operations::management::eventing_get_all_functions_request request,
|
1138
|
+
utils::movable_function<void(operations::management::eventing_get_all_functions_response)>&& handler) const
|
1139
|
+
{
|
1140
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
void
|
1144
|
+
cluster::execute(operations::management::eventing_get_function_request request,
|
1145
|
+
utils::movable_function<void(operations::management::eventing_get_function_response)>&& handler) const
|
1146
|
+
{
|
1147
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
void
|
1151
|
+
cluster::execute(operations::management::eventing_get_status_request request,
|
1152
|
+
utils::movable_function<void(operations::management::eventing_get_status_response)>&& handler) const
|
1153
|
+
{
|
1154
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1155
|
+
}
|
1156
|
+
|
1157
|
+
void
|
1158
|
+
cluster::execute(operations::management::eventing_pause_function_request request,
|
1159
|
+
utils::movable_function<void(operations::management::eventing_pause_function_response)>&& handler) const
|
1160
|
+
{
|
1161
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
void
|
1165
|
+
cluster::execute(operations::management::eventing_resume_function_request request,
|
1166
|
+
utils::movable_function<void(operations::management::eventing_resume_function_response)>&& handler) const
|
1167
|
+
{
|
1168
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
void
|
1172
|
+
cluster::execute(operations::management::eventing_undeploy_function_request request,
|
1173
|
+
utils::movable_function<void(operations::management::eventing_undeploy_function_response)>&& handler) const
|
1174
|
+
{
|
1175
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
void
|
1179
|
+
cluster::execute(operations::management::eventing_upsert_function_request request,
|
1180
|
+
utils::movable_function<void(operations::management::eventing_upsert_function_response)>&& handler) const
|
1181
|
+
{
|
1182
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1183
|
+
}
|
1184
|
+
|
1185
|
+
void
|
1186
|
+
cluster::execute(operations::management::view_index_drop_request request,
|
1187
|
+
utils::movable_function<void(operations::management::view_index_drop_response)>&& handler) const
|
1188
|
+
{
|
1189
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
void
|
1193
|
+
cluster::execute(operations::management::view_index_get_request request,
|
1194
|
+
utils::movable_function<void(operations::management::view_index_get_response)>&& handler) const
|
1195
|
+
{
|
1196
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
void
|
1200
|
+
cluster::execute(operations::management::view_index_get_all_request request,
|
1201
|
+
utils::movable_function<void(operations::management::view_index_get_all_response)>&& handler) const
|
1202
|
+
{
|
1203
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
void
|
1207
|
+
cluster::execute(operations::management::view_index_upsert_request request,
|
1208
|
+
utils::movable_function<void(operations::management::view_index_upsert_response)>&& handler) const
|
1209
|
+
{
|
1210
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
void
|
1214
|
+
cluster::execute(operations::management::change_password_request request,
|
1215
|
+
utils::movable_function<void(operations::management::change_password_response)>&& handler) const
|
1216
|
+
{
|
1217
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
void
|
1221
|
+
cluster::execute(operations::management::group_drop_request request,
|
1222
|
+
utils::movable_function<void(operations::management::group_drop_response)>&& handler) const
|
1223
|
+
{
|
1224
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
void
|
1228
|
+
cluster::execute(operations::management::group_get_request request,
|
1229
|
+
utils::movable_function<void(operations::management::group_get_response)>&& handler) const
|
1230
|
+
{
|
1231
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1232
|
+
}
|
1233
|
+
|
1234
|
+
void
|
1235
|
+
cluster::execute(operations::management::group_get_all_request request,
|
1236
|
+
utils::movable_function<void(operations::management::group_get_all_response)>&& handler) const
|
1237
|
+
{
|
1238
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
void
|
1242
|
+
cluster::execute(operations::management::group_upsert_request request,
|
1243
|
+
utils::movable_function<void(operations::management::group_upsert_response)>&& handler) const
|
1244
|
+
{
|
1245
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
void
|
1249
|
+
cluster::execute(operations::management::role_get_all_request request,
|
1250
|
+
utils::movable_function<void(operations::management::role_get_all_response)>&& handler) const
|
1251
|
+
{
|
1252
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1253
|
+
}
|
1254
|
+
|
1255
|
+
void
|
1256
|
+
cluster::execute(operations::management::user_drop_request request,
|
1257
|
+
utils::movable_function<void(operations::management::user_drop_response)>&& handler) const
|
1258
|
+
{
|
1259
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
void
|
1263
|
+
cluster::execute(operations::management::user_get_request request,
|
1264
|
+
utils::movable_function<void(operations::management::user_get_response)>&& handler) const
|
1265
|
+
{
|
1266
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
void
|
1270
|
+
cluster::execute(operations::management::user_get_all_request request,
|
1271
|
+
utils::movable_function<void(operations::management::user_get_all_response)>&& handler) const
|
1272
|
+
{
|
1273
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
void
|
1277
|
+
cluster::execute(operations::management::user_upsert_request request,
|
1278
|
+
utils::movable_function<void(operations::management::user_upsert_response)>&& handler) const
|
1279
|
+
{
|
1280
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1281
|
+
}
|
1282
|
+
|
1283
|
+
void
|
1284
|
+
cluster::execute(operations::management::search_get_stats_request request,
|
1285
|
+
utils::movable_function<void(operations::management::search_get_stats_response)>&& handler) const
|
1286
|
+
{
|
1287
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1288
|
+
}
|
1289
|
+
|
1290
|
+
void
|
1291
|
+
cluster::execute(operations::management::search_index_analyze_document_request request,
|
1292
|
+
utils::movable_function<void(operations::management::search_index_analyze_document_response)>&& handler) const
|
1293
|
+
{
|
1294
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
void
|
1298
|
+
cluster::execute(operations::management::search_index_control_ingest_request request,
|
1299
|
+
utils::movable_function<void(operations::management::search_index_control_ingest_response)>&& handler) const
|
1300
|
+
{
|
1301
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
void
|
1305
|
+
cluster::execute(operations::management::search_index_control_plan_freeze_request request,
|
1306
|
+
utils::movable_function<void(operations::management::search_index_control_plan_freeze_response)>&& handler) const
|
1307
|
+
{
|
1308
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
void
|
1312
|
+
cluster::execute(operations::management::search_index_control_query_request request,
|
1313
|
+
utils::movable_function<void(operations::management::search_index_control_query_response)>&& handler) const
|
1314
|
+
{
|
1315
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
void
|
1319
|
+
cluster::execute(operations::management::search_index_drop_request request,
|
1320
|
+
utils::movable_function<void(operations::management::search_index_drop_response)>&& handler) const
|
1321
|
+
{
|
1322
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
void
|
1326
|
+
cluster::execute(operations::management::search_index_get_request request,
|
1327
|
+
utils::movable_function<void(operations::management::search_index_get_response)>&& handler) const
|
1328
|
+
{
|
1329
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
void
|
1333
|
+
cluster::execute(operations::management::search_index_get_all_request request,
|
1334
|
+
utils::movable_function<void(operations::management::search_index_get_all_response)>&& handler) const
|
1335
|
+
{
|
1336
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
void
|
1340
|
+
cluster::execute(operations::management::search_index_get_documents_count_request request,
|
1341
|
+
utils::movable_function<void(operations::management::search_index_get_documents_count_response)>&& handler) const
|
1342
|
+
{
|
1343
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
void
|
1347
|
+
cluster::execute(operations::management::search_index_get_stats_request request,
|
1348
|
+
utils::movable_function<void(operations::management::search_index_get_stats_response)>&& handler) const
|
1349
|
+
{
|
1350
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1351
|
+
}
|
1352
|
+
|
1353
|
+
void
|
1354
|
+
cluster::execute(operations::management::search_index_upsert_request request,
|
1355
|
+
utils::movable_function<void(operations::management::search_index_upsert_response)>&& handler) const
|
1356
|
+
{
|
1357
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1358
|
+
}
|
1359
|
+
|
1360
|
+
void
|
1361
|
+
cluster::execute(operations::management::query_index_build_request request,
|
1362
|
+
utils::movable_function<void(operations::management::query_index_build_response)>&& handler) const
|
1363
|
+
{
|
1364
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
void
|
1368
|
+
cluster::execute(operations::management::query_index_build_deferred_request request,
|
1369
|
+
utils::movable_function<void(operations::management::query_index_build_deferred_response)>&& handler) const
|
1370
|
+
{
|
1371
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
void
|
1375
|
+
cluster::execute(operations::management::query_index_create_request request,
|
1376
|
+
utils::movable_function<void(operations::management::query_index_create_response)>&& handler) const
|
1377
|
+
{
|
1378
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
void
|
1382
|
+
cluster::execute(operations::management::query_index_drop_request request,
|
1383
|
+
utils::movable_function<void(operations::management::query_index_drop_response)>&& handler) const
|
1384
|
+
{
|
1385
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
void
|
1389
|
+
cluster::execute(operations::management::query_index_get_all_request request,
|
1390
|
+
utils::movable_function<void(operations::management::query_index_get_all_response)>&& handler) const
|
1391
|
+
{
|
1392
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
void
|
1396
|
+
cluster::execute(operations::management::query_index_get_all_deferred_request request,
|
1397
|
+
utils::movable_function<void(operations::management::query_index_get_all_deferred_response)>&& handler) const
|
1398
|
+
{
|
1399
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
void
|
1403
|
+
cluster::execute(operations::management::bucket_describe_request request,
|
1404
|
+
utils::movable_function<void(operations::management::bucket_describe_response)>&& handler) const
|
1405
|
+
{
|
1406
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1407
|
+
}
|
1408
|
+
|
1409
|
+
void
|
1410
|
+
cluster::execute(operations::management::cluster_describe_request request,
|
1411
|
+
utils::movable_function<void(operations::management::cluster_describe_response)>&& handler) const
|
1412
|
+
{
|
1413
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1414
|
+
}
|
1415
|
+
|
1416
|
+
void
|
1417
|
+
cluster::execute(operations::management::cluster_developer_preview_enable_request request,
|
1418
|
+
utils::movable_function<void(operations::management::cluster_developer_preview_enable_response)>&& handler) const
|
1419
|
+
{
|
1420
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
void
|
1424
|
+
cluster::execute(operations::management::freeform_request request,
|
1425
|
+
utils::movable_function<void(operations::management::freeform_response)>&& handler) const
|
1426
|
+
{
|
1427
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1428
|
+
}
|
1429
|
+
|
1430
|
+
void
|
1431
|
+
cluster::execute(impl::get_replica_request request, utils::movable_function<void(impl::get_replica_response)>&& handler) const
|
1432
|
+
{
|
1433
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1434
|
+
}
|
1435
|
+
|
1436
|
+
void
|
1437
|
+
cluster::execute(impl::observe_seqno_request request, utils::movable_function<void(impl::observe_seqno_response)>&& handler) const
|
1438
|
+
{
|
1439
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1440
|
+
}
|
1441
|
+
|
1442
|
+
void
|
1443
|
+
cluster::execute(operations::management::analytics_link_replace_request<management::analytics::azure_blob_external_link> request,
|
1444
|
+
utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
|
1445
|
+
{
|
1446
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
void
|
1450
|
+
cluster::execute(operations::management::analytics_link_replace_request<management::analytics::couchbase_remote_link> request,
|
1451
|
+
utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
|
1452
|
+
{
|
1453
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
void
|
1457
|
+
cluster::execute(operations::management::analytics_link_replace_request<management::analytics::s3_external_link> request,
|
1458
|
+
utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
|
1459
|
+
{
|
1460
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
void
|
1464
|
+
cluster::execute(operations::management::analytics_link_create_request<management::analytics::azure_blob_external_link> request,
|
1465
|
+
utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
|
1466
|
+
{
|
1467
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1468
|
+
}
|
1469
|
+
|
1470
|
+
void
|
1471
|
+
cluster::execute(operations::management::analytics_link_create_request<management::analytics::couchbase_remote_link> request,
|
1472
|
+
utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
|
1473
|
+
{
|
1474
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1475
|
+
}
|
1476
|
+
|
1477
|
+
void
|
1478
|
+
cluster::execute(operations::management::analytics_link_create_request<management::analytics::s3_external_link> request,
|
1479
|
+
utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
|
1480
|
+
{
|
1481
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
void
|
1485
|
+
cluster::execute(operations::analytics_request request, utils::movable_function<void(operations::analytics_response)>&& handler) const
|
1486
|
+
{
|
1487
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1488
|
+
}
|
1489
|
+
|
1490
|
+
void
|
1491
|
+
cluster::execute(operations::upsert_request_with_legacy_durability request,
|
1492
|
+
utils::movable_function<void(operations::upsert_response)>&& handler) const
|
1493
|
+
{
|
1494
|
+
return request.execute(*this, std::move(handler));
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
void
|
1498
|
+
cluster::execute(operations::insert_request_with_legacy_durability request,
|
1499
|
+
utils::movable_function<void(operations::insert_response)>&& handler) const
|
1500
|
+
{
|
1501
|
+
return request.execute(*this, std::move(handler));
|
1502
|
+
}
|
1503
|
+
|
1504
|
+
void
|
1505
|
+
cluster::execute(operations::append_request_with_legacy_durability request,
|
1506
|
+
utils::movable_function<void(operations::append_response)>&& handler) const
|
1507
|
+
{
|
1508
|
+
return request.execute(*this, std::move(handler));
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
void
|
1512
|
+
cluster::execute(operations::prepend_request_with_legacy_durability request,
|
1513
|
+
utils::movable_function<void(operations::prepend_response)>&& handler) const
|
1514
|
+
{
|
1515
|
+
return request.execute(*this, std::move(handler));
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
void
|
1519
|
+
cluster::execute(operations::replace_request_with_legacy_durability request,
|
1520
|
+
utils::movable_function<void(operations::replace_response)>&& handler) const
|
1521
|
+
{
|
1522
|
+
return request.execute(*this, std::move(handler));
|
1523
|
+
}
|
1524
|
+
|
1525
|
+
void
|
1526
|
+
cluster::execute(operations::mutate_in_request_with_legacy_durability request,
|
1527
|
+
utils::movable_function<void(operations::mutate_in_response)>&& handler) const
|
1528
|
+
{
|
1529
|
+
return request.execute(*this, std::move(handler));
|
1530
|
+
}
|
1531
|
+
|
1532
|
+
void
|
1533
|
+
cluster::execute(operations::remove_request_with_legacy_durability request,
|
1534
|
+
utils::movable_function<void(operations::remove_response)>&& handler) const
|
1535
|
+
{
|
1536
|
+
return request.execute(*this, std::move(handler));
|
1537
|
+
}
|
1538
|
+
|
1539
|
+
void
|
1540
|
+
cluster::execute(operations::increment_request_with_legacy_durability request,
|
1541
|
+
utils::movable_function<void(operations::increment_response)>&& handler) const
|
1542
|
+
{
|
1543
|
+
return request.execute(*this, std::move(handler));
|
1544
|
+
}
|
1545
|
+
|
1546
|
+
void
|
1547
|
+
cluster::execute(operations::decrement_request_with_legacy_durability request,
|
1548
|
+
utils::movable_function<void(operations::decrement_response)>&& handler) const
|
1549
|
+
{
|
1550
|
+
return request.execute(*this, std::move(handler));
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
void
|
1554
|
+
cluster::execute(impl::lookup_in_replica_request request, utils::movable_function<void(impl::lookup_in_replica_response)>&& handler) const
|
1555
|
+
{
|
1556
|
+
return impl_->execute(std::move(request), std::move(handler));
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
auto
|
1560
|
+
cluster::to_string() const -> std::string
|
1561
|
+
{
|
1562
|
+
return fmt::format(
|
1563
|
+
R"(#<cluster:{} impl={}>)", static_cast<const void*>(this), impl_ ? static_cast<const void*>(impl_.get()) : "(none)");
|
1564
|
+
}
|
220
1565
|
} // namespace couchbase::core
|