couchbase 4.6.0 → 4.7.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +2 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +66 -93
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +24 -11
- package/deps/couchbase-cxx-client/README.md +17 -16
- package/deps/couchbase-cxx-client/cmake/APKBUILD.in +17 -1
- package/deps/couchbase-cxx-client/cmake/Bundler.cmake +9 -1
- package/deps/couchbase-cxx-client/cmake/Cache.cmake +48 -19
- package/deps/couchbase-cxx-client/cmake/CompilerOptions.cmake +3 -1
- package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +10 -2
- package/deps/couchbase-cxx-client/cmake/Packaging.cmake +48 -8
- package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +43 -1
- package/deps/couchbase-cxx-client/cmake/build_config.hxx.in +2 -0
- package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +18 -0
- package/deps/couchbase-cxx-client/cmake/debian/control +6 -1
- package/deps/couchbase-cxx-client/cmake/debian/rules +1 -0
- package/deps/couchbase-cxx-client/cmake/tarball_glob.txt +10 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_meter.cxx +1 -0
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.cxx +45 -43
- package/deps/couchbase-cxx-client/core/app_telemetry_reporter.hxx +4 -3
- package/deps/couchbase-cxx-client/core/bucket.cxx +128 -13
- package/deps/couchbase-cxx-client/core/bucket.hxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster.cxx +304 -152
- package/deps/couchbase-cxx-client/core/cluster.hxx +32 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.cxx +25 -0
- package/deps/couchbase-cxx-client/core/cluster_credentials.hxx +5 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.cxx +72 -0
- package/deps/couchbase-cxx-client/core/cluster_label_listener.hxx +46 -0
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +4 -0
- package/deps/couchbase-cxx-client/core/deprecation_utils.hxx +26 -0
- package/deps/couchbase-cxx-client/core/error.hxx +27 -0
- package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +0 -2
- package/deps/couchbase-cxx-client/core/http_component.cxx +12 -48
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +3 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +249 -137
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +134 -58
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +87 -35
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +560 -245
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +89 -49
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +4 -4
- package/deps/couchbase-cxx-client/core/impl/error.cxx +20 -13
- package/deps/couchbase-cxx-client/core/impl/error.hxx +15 -10
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.cxx +161 -0
- package/deps/couchbase-cxx-client/core/impl/observability_recorder.hxx +77 -0
- package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/public_bucket.cxx +31 -7
- package/deps/couchbase-cxx-client/core/impl/public_cluster.cxx +107 -19
- package/deps/couchbase-cxx-client/core/impl/query.cxx +6 -3
- package/deps/couchbase-cxx-client/core/impl/query.hxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +267 -102
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +53 -11
- package/deps/couchbase-cxx-client/core/impl/search.cxx +8 -4
- package/deps/couchbase-cxx-client/core/impl/search.hxx +6 -2
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +131 -41
- package/deps/couchbase-cxx-client/core/impl/with_cancellation.hxx +75 -0
- package/deps/couchbase-cxx-client/core/io/config_tracker.cxx +9 -9
- package/deps/couchbase-cxx-client/core/io/config_tracker.hxx +2 -1
- package/deps/couchbase-cxx-client/core/io/http_command.hxx +98 -49
- package/deps/couchbase-cxx-client/core/io/http_context.hxx +2 -0
- package/deps/couchbase-cxx-client/core/io/http_session.cxx +23 -10
- package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -9
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +163 -228
- package/deps/couchbase-cxx-client/core/io/http_traits.hxx +0 -7
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +123 -44
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +251 -26
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_traits.hxx +0 -8
- package/deps/couchbase-cxx-client/core/io/streams.cxx +3 -3
- package/deps/couchbase-cxx-client/core/io/streams.hxx +3 -2
- package/deps/couchbase-cxx-client/core/meta/features.hxx +15 -0
- package/deps/couchbase-cxx-client/core/meta/version.cxx +13 -0
- package/deps/couchbase-cxx-client/core/meta/version.hxx +3 -0
- package/deps/couchbase-cxx-client/core/metrics/constants.hxx +23 -0
- package/deps/couchbase-cxx-client/core/metrics/logging_meter.cxx +5 -5
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +65 -63
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +12 -10
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +77 -27
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +83 -2
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +0 -9
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +46 -4
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +121 -43
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +0 -5
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +0 -7
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +0 -6
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +0 -4
- package/deps/couchbase-cxx-client/core/operations/document_view.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +10 -13
- package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +68 -30
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +4 -3
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/operation_traits.hxx +6 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +8 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +67 -12
- package/deps/couchbase-cxx-client/core/origin.hxx +13 -8
- package/deps/couchbase-cxx-client/core/orphan_reporter.cxx +164 -0
- package/deps/couchbase-cxx-client/core/orphan_reporter.hxx +65 -0
- package/deps/couchbase-cxx-client/core/sasl/CMakeLists.txt +1 -0
- package/deps/couchbase-cxx-client/core/sasl/client.cc +6 -0
- package/deps/couchbase-cxx-client/core/sasl/mechanism.cc +2 -1
- package/deps/couchbase-cxx-client/core/sasl/mechanism.h +2 -1
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.cc +41 -0
- package/deps/couchbase-cxx-client/core/sasl/oauthbearer/oauthbearer.h +47 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.cxx +44 -0
- package/deps/couchbase-cxx-client/core/tls_context_provider.hxx +44 -0
- package/deps/couchbase-cxx-client/core/tracing/attribute_helpers.hxx +45 -0
- package/deps/couchbase-cxx-client/core/tracing/constants.hxx +148 -68
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_options.hxx +0 -3
- package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.cxx +122 -170
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +17 -24
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +8 -10
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.cxx +114 -0
- package/deps/couchbase-cxx-client/core/tracing/wrapper_sdk_tracer.hxx +85 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +1 -2
- package/deps/couchbase-cxx-client/core/utils/byteswap.hxx +12 -0
- package/deps/couchbase-cxx-client/core/utils/concurrent_fixed_priority_queue.hxx +102 -0
- package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/certificate_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +47 -0
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +16 -0
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +60 -15
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +48 -48
- package/deps/couchbase-cxx-client/couchbase/jwt_authenticator.hxx +52 -0
- package/deps/couchbase-cxx-client/couchbase/metrics/meter.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +75 -80
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/password_authenticator.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/tracing/otel_tracer.hxx +15 -17
- package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +2 -2
- package/dist/analyticsexecutor.d.ts +15 -0
- package/dist/analyticsexecutor.js +79 -50
- package/dist/analyticsindexmanager.d.ts +66 -0
- package/dist/analyticsindexmanager.js +404 -277
- package/dist/analyticstypes.d.ts +5 -0
- package/dist/authenticators.d.ts +34 -1
- package/dist/authenticators.js +19 -1
- package/dist/binarycollection.d.ts +17 -0
- package/dist/binding.d.ts +245 -228
- package/dist/binding.js +2 -2
- package/dist/bindingutilities.js +1 -1
- package/dist/bucket.d.ts +8 -0
- package/dist/bucket.js +8 -0
- package/dist/bucketmanager.d.ts +30 -0
- package/dist/bucketmanager.js +128 -69
- package/dist/cluster.d.ts +45 -0
- package/dist/cluster.js +133 -23
- package/dist/collection.d.ts +75 -2
- package/dist/collection.js +773 -552
- package/dist/collectionmanager.d.ts +34 -0
- package/dist/collectionmanager.js +172 -89
- package/dist/couchbase.d.ts +5 -0
- package/dist/couchbase.js +5 -0
- package/dist/datastructures.js +310 -97
- package/dist/diagnosticsexecutor.js +1 -1
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +12 -1
- package/dist/eventingfunctionmanager.d.ts +42 -0
- package/dist/eventingfunctionmanager.js +172 -100
- package/dist/logger.d.ts +192 -0
- package/dist/logger.js +213 -0
- package/dist/loggingmeter.d.ts +120 -0
- package/dist/loggingmeter.js +226 -0
- package/dist/metrics.d.ts +33 -0
- package/dist/metrics.js +5 -0
- package/dist/observability.d.ts +60 -0
- package/dist/observability.js +86 -0
- package/dist/observabilityhandler.d.ts +176 -0
- package/dist/observabilityhandler.js +733 -0
- package/dist/observabilitytypes.d.ts +320 -0
- package/dist/observabilitytypes.js +362 -0
- package/dist/observabilityutilities.d.ts +60 -0
- package/dist/observabilityutilities.js +175 -0
- package/dist/otelmeter.d.ts +51 -0
- package/dist/otelmeter.js +100 -0
- package/dist/oteltracer.d.ts +69 -0
- package/dist/oteltracer.js +141 -0
- package/dist/queryexecutor.d.ts +16 -0
- package/dist/queryexecutor.js +128 -86
- package/dist/queryindexmanager.d.ts +29 -0
- package/dist/queryindexmanager.js +277 -150
- package/dist/querytypes.d.ts +5 -0
- package/dist/scope.js +2 -2
- package/dist/scopeeventingfunctionmanager.d.ts +5 -0
- package/dist/scopeeventingfunctionmanager.js +217 -119
- package/dist/scopesearchindexmanager.d.ts +5 -0
- package/dist/scopesearchindexmanager.js +295 -166
- package/dist/sdspecs.js +6 -1
- package/dist/searchexecutor.d.ts +15 -0
- package/dist/searchexecutor.js +54 -26
- package/dist/searchindexmanager.d.ts +54 -0
- package/dist/searchindexmanager.js +235 -142
- package/dist/searchtypes.d.ts +5 -0
- package/dist/thresholdlogging.d.ts +301 -0
- package/dist/thresholdlogging.js +657 -0
- package/dist/tracing.d.ts +55 -0
- package/dist/tracing.js +2 -0
- package/dist/transactions.js +1 -1
- package/dist/transcoders.js +1 -1
- package/dist/usermanager.d.ts +46 -0
- package/dist/usermanager.js +199 -118
- package/dist/utilities.d.ts +4 -0
- package/dist/utilities.js +11 -1
- package/dist/utilities_internal.js +0 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.js +7 -0
- package/dist/viewexecutor.d.ts +15 -0
- package/dist/viewexecutor.js +54 -29
- package/dist/viewindexmanager.d.ts +30 -0
- package/dist/viewindexmanager.js +129 -100
- package/dist/viewtypes.d.ts +5 -0
- package/package.json +32 -18
- package/scripts/buildPrebuild.js +2 -0
- package/scripts/install.js +2 -0
- package/scripts/prebuilds.js +7 -8
- package/scripts/prune.js +2 -0
- package/scripts/updateVersion.js +26 -0
- package/src/connection.cpp +79 -98
- package/src/connection.hpp +46 -38
- package/src/connection_autogen.cpp +1236 -292
- package/src/jstocbpp_autogen.hpp +1117 -313
- package/src/jstocbpp_basic.hpp +73 -0
- package/src/jstocbpp_defs.hpp +37 -9
- package/src/jstocbpp_errors.hpp +37 -11
- package/tools/gen-bindings-js.js +100 -22
- package/tools/gen-bindings-json.py +40 -6
- package/src/transcoder.hpp +0 -96
package/dist/cluster.js
CHANGED
|
@@ -14,10 +14,15 @@ const configProfile_1 = require("./configProfile");
|
|
|
14
14
|
const connspec_1 = require("./connspec");
|
|
15
15
|
const diagnosticsexecutor_1 = require("./diagnosticsexecutor");
|
|
16
16
|
const eventingfunctionmanager_1 = require("./eventingfunctionmanager");
|
|
17
|
+
const logger_1 = require("./logger");
|
|
18
|
+
const loggingmeter_1 = require("./loggingmeter");
|
|
19
|
+
const observability_1 = require("./observability");
|
|
20
|
+
const observabilitytypes_1 = require("./observabilitytypes");
|
|
17
21
|
const queryexecutor_1 = require("./queryexecutor");
|
|
18
22
|
const queryindexmanager_1 = require("./queryindexmanager");
|
|
19
23
|
const searchexecutor_1 = require("./searchexecutor");
|
|
20
24
|
const searchindexmanager_1 = require("./searchindexmanager");
|
|
25
|
+
const thresholdlogging_1 = require("./thresholdlogging");
|
|
21
26
|
const transactions_1 = require("./transactions");
|
|
22
27
|
const transcoders_1 = require("./transcoders");
|
|
23
28
|
const usermanager_1 = require("./usermanager");
|
|
@@ -104,11 +109,22 @@ class Cluster {
|
|
|
104
109
|
get resolveTimeout() {
|
|
105
110
|
return this._resolveTimeout;
|
|
106
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
@internal
|
|
114
|
+
*/
|
|
115
|
+
get logger() {
|
|
116
|
+
return this._logger;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
get observabilityInstruments() {
|
|
122
|
+
return this._observabilityInstruments;
|
|
123
|
+
}
|
|
107
124
|
/**
|
|
108
125
|
* @internal
|
|
109
126
|
*/
|
|
110
127
|
[util_1.inspect.custom]() {
|
|
111
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
112
128
|
const { _auth, ...rest } = this;
|
|
113
129
|
return { ...rest, _auth: '***hidden***' };
|
|
114
130
|
}
|
|
@@ -116,7 +132,6 @@ class Cluster {
|
|
|
116
132
|
* @internal
|
|
117
133
|
*/
|
|
118
134
|
toJSON() {
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120
135
|
const { _auth, ...rest } = this;
|
|
121
136
|
return { ...rest, _auth: '***hidden***' };
|
|
122
137
|
}
|
|
@@ -208,6 +223,9 @@ class Cluster {
|
|
|
208
223
|
else {
|
|
209
224
|
this._appTelemetryConfig = null;
|
|
210
225
|
}
|
|
226
|
+
if (options.tracer) {
|
|
227
|
+
this._tracer = options.tracer;
|
|
228
|
+
}
|
|
211
229
|
if (options.tracingConfig) {
|
|
212
230
|
this._tracingConfig = {
|
|
213
231
|
enableTracing: options.tracingConfig.enableTracing,
|
|
@@ -226,8 +244,8 @@ class Cluster {
|
|
|
226
244
|
this._tracingConfig = null;
|
|
227
245
|
}
|
|
228
246
|
if (options.orphanReporterConfig) {
|
|
229
|
-
// TODO(JSCBC-1364): Add enableReporting to config when supported in C++ core
|
|
230
247
|
this._orphanReporterConfig = {
|
|
248
|
+
enableOrphanReporting: options.orphanReporterConfig.enableOrphanReporting,
|
|
231
249
|
emitInterval: options.orphanReporterConfig.emitInterval,
|
|
232
250
|
sampleSize: options.orphanReporterConfig.sampleSize,
|
|
233
251
|
};
|
|
@@ -235,6 +253,9 @@ class Cluster {
|
|
|
235
253
|
else {
|
|
236
254
|
this._orphanReporterConfig = null;
|
|
237
255
|
}
|
|
256
|
+
if (options.meter) {
|
|
257
|
+
this._meter = options.meter;
|
|
258
|
+
}
|
|
238
259
|
if (options.metricsConfig) {
|
|
239
260
|
this._metricsConfig = {
|
|
240
261
|
enableMetrics: options.metricsConfig.enableMetrics,
|
|
@@ -244,6 +265,27 @@ class Cluster {
|
|
|
244
265
|
else {
|
|
245
266
|
this._metricsConfig = null;
|
|
246
267
|
}
|
|
268
|
+
if (!options.logger) {
|
|
269
|
+
const envLogLevel = process.env.CNLOGLEVEL;
|
|
270
|
+
if (envLogLevel) {
|
|
271
|
+
const level = (0, logger_1.parseLogLevel)(envLogLevel);
|
|
272
|
+
if (level !== undefined) {
|
|
273
|
+
this._logger = (0, logger_1.createConsoleLogger)(level);
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
this._logger = new logger_1.CouchbaseLogger(new logger_1.NoOpLogger());
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
this._logger = new logger_1.CouchbaseLogger(new logger_1.NoOpLogger());
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
this._logger =
|
|
285
|
+
options.logger instanceof logger_1.CouchbaseLogger
|
|
286
|
+
? options.logger
|
|
287
|
+
: new logger_1.CouchbaseLogger(options.logger);
|
|
288
|
+
}
|
|
247
289
|
this._openBuckets = [];
|
|
248
290
|
this._conn = new binding_1.default.Connection();
|
|
249
291
|
}
|
|
@@ -267,7 +309,7 @@ class Cluster {
|
|
|
267
309
|
this._conn.openBucket(bucketName, (err) => {
|
|
268
310
|
if (err) {
|
|
269
311
|
// BUG(JSCBC-1011): Move this to log framework once it is implemented.
|
|
270
|
-
console.error(
|
|
312
|
+
console.error(`failed to open bucket: ${bucketName}`, err);
|
|
271
313
|
}
|
|
272
314
|
});
|
|
273
315
|
this._openBuckets.push(bucketName);
|
|
@@ -455,12 +497,93 @@ class Cluster {
|
|
|
455
497
|
await this._transactions._close();
|
|
456
498
|
this._transactions = undefined;
|
|
457
499
|
}
|
|
500
|
+
if (this._tracer instanceof thresholdlogging_1.ThresholdLoggingTracer) {
|
|
501
|
+
this._tracer.cleanup();
|
|
502
|
+
}
|
|
503
|
+
if (this._meter instanceof loggingmeter_1.LoggingMeter) {
|
|
504
|
+
this._meter.cleanup();
|
|
505
|
+
}
|
|
458
506
|
return utilities_1.PromiseHelper.wrap((wrapCallback) => {
|
|
459
507
|
this._conn.shutdown((cppErr) => {
|
|
460
508
|
wrapCallback((0, bindingutilities_1.errorFromCpp)(cppErr));
|
|
461
509
|
});
|
|
462
510
|
}, callback);
|
|
463
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Update the credentials used by this cluster.
|
|
514
|
+
*
|
|
515
|
+
* @param auth The new credentials to use.
|
|
516
|
+
*/
|
|
517
|
+
updateCredentials(auth) {
|
|
518
|
+
const cppErr = this._conn.updateCredentials(this._getCppCredentials(auth));
|
|
519
|
+
if (cppErr) {
|
|
520
|
+
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
521
|
+
throw err;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @internal
|
|
526
|
+
*/
|
|
527
|
+
_getClusterLabels() {
|
|
528
|
+
const resp = this._conn.getClusterLabels();
|
|
529
|
+
return { clusterName: resp.clusterName, clusterUUID: resp.clusterUUID };
|
|
530
|
+
}
|
|
531
|
+
_getCppCredentials(auth, saslMechanisms) {
|
|
532
|
+
const authOpts = {};
|
|
533
|
+
if (auth) {
|
|
534
|
+
const passAuth = auth;
|
|
535
|
+
if (passAuth.username || passAuth.password) {
|
|
536
|
+
authOpts.username = passAuth.username;
|
|
537
|
+
authOpts.password = passAuth.password;
|
|
538
|
+
if (saslMechanisms) {
|
|
539
|
+
authOpts.allowed_sasl_mechanisms = saslMechanisms;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
const certAuth = auth;
|
|
543
|
+
if (certAuth.certificatePath || certAuth.keyPath) {
|
|
544
|
+
authOpts.certificate_path = certAuth.certificatePath;
|
|
545
|
+
authOpts.key_path = certAuth.keyPath;
|
|
546
|
+
}
|
|
547
|
+
const jwtAuth = auth;
|
|
548
|
+
if (jwtAuth.token) {
|
|
549
|
+
authOpts.jwt_token = jwtAuth.token;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return authOpts;
|
|
553
|
+
}
|
|
554
|
+
_setupObservability() {
|
|
555
|
+
// [tracing|metrics] is explicitly disabled IFF:
|
|
556
|
+
// we have a [tracing|metrics]Config AND [tracing|metrics]Config.enable[Tracing|Metrics] === false
|
|
557
|
+
// _[tracing|metrics]Config = null => FALSE
|
|
558
|
+
// _[tracing|metrics]Config = undefined => FALSE
|
|
559
|
+
// _[tracing|metrics]Config.enable[Tracing|Metrics] = true => FALSE
|
|
560
|
+
// _[tracing|metrics]Config.enable[Tracing|Metrics] = false => TRUE
|
|
561
|
+
var _a, _b, _c, _d, _e;
|
|
562
|
+
const tracingExplicitlyDisabled = ((_a = this._tracingConfig) !== null && _a !== void 0 ? _a : false) && !((_b = this._tracingConfig) === null || _b === void 0 ? void 0 : _b.enableTracing);
|
|
563
|
+
// we want to enable tracing IFF we don't have a tracer && tracing was NOT explicitly disabled
|
|
564
|
+
const enableTracing = typeof this._tracer !== 'undefined' || !tracingExplicitlyDisabled;
|
|
565
|
+
// if tracing is enabled, but we don't have a tracer, default to the ThresholdLoggingTracer
|
|
566
|
+
if (enableTracing && !this._tracer) {
|
|
567
|
+
this._tracer = new thresholdlogging_1.ThresholdLoggingTracer(this._logger, this._tracingConfig);
|
|
568
|
+
}
|
|
569
|
+
// if we don't have a tracer at this point, tracing is NOT enabled, use the NoOpTracer
|
|
570
|
+
if (!this._tracer) {
|
|
571
|
+
this._tracer = new observability_1.NoOpTracer();
|
|
572
|
+
}
|
|
573
|
+
const metricsExplicitlyDisabled = ((_c = this._metricsConfig) !== null && _c !== void 0 ? _c : false) && !((_d = this._metricsConfig) === null || _d === void 0 ? void 0 : _d.enableMetrics);
|
|
574
|
+
// we want to enable metrics IFF we don't have a meter && metrics was NOT explicitly disabled
|
|
575
|
+
const enableMetrics = typeof this._meter !== 'undefined' || !metricsExplicitlyDisabled;
|
|
576
|
+
// if metrics is enabled, but we don't have a meter, default to the LoggingMeter
|
|
577
|
+
if (enableMetrics && !this._meter) {
|
|
578
|
+
this._meter = new loggingmeter_1.LoggingMeter(this._logger, (_e = this._metricsConfig) === null || _e === void 0 ? void 0 : _e.emitInterval);
|
|
579
|
+
}
|
|
580
|
+
// if we don't have a meter at this point, metrics is NOT enabled, use the NoOpMeter
|
|
581
|
+
if (!this._meter) {
|
|
582
|
+
this._meter = new observability_1.NoOpMeter();
|
|
583
|
+
}
|
|
584
|
+
this._observabilityInstruments = new observabilitytypes_1.ObservabilityInstruments(this._tracer, this._meter, () => this._getClusterLabels());
|
|
585
|
+
return [enableTracing, enableMetrics];
|
|
586
|
+
}
|
|
464
587
|
async _connect() {
|
|
465
588
|
return new Promise((resolve, reject) => {
|
|
466
589
|
const dsnObj = connspec_1.ConnSpec.parse(this._connStr);
|
|
@@ -488,36 +611,23 @@ class Cluster {
|
|
|
488
611
|
dsnObj.options['server_group'] = this._preferredServerGroup;
|
|
489
612
|
}
|
|
490
613
|
const connStr = dsnObj.toString();
|
|
491
|
-
const authOpts = {};
|
|
492
614
|
// lets allow `allowed_sasl_mechanisms` to override legacy connstr option
|
|
615
|
+
let saslMechansims;
|
|
493
616
|
for (const saslKey of ['sasl_mech_force', 'allowed_sasl_mechanisms']) {
|
|
494
617
|
if (!(saslKey in dsnObj.options)) {
|
|
495
618
|
continue;
|
|
496
619
|
}
|
|
497
620
|
if (typeof dsnObj.options[saslKey] === 'string') {
|
|
498
|
-
|
|
621
|
+
saslMechansims = [dsnObj.options[saslKey]];
|
|
499
622
|
}
|
|
500
623
|
else {
|
|
501
|
-
|
|
624
|
+
saslMechansims = dsnObj.options[saslKey];
|
|
502
625
|
}
|
|
503
626
|
delete dsnObj.options[saslKey];
|
|
504
627
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
authOpts.username = passAuth.username;
|
|
509
|
-
authOpts.password = passAuth.password;
|
|
510
|
-
if (passAuth.allowed_sasl_mechanisms) {
|
|
511
|
-
authOpts.allowed_sasl_mechanisms = passAuth.allowed_sasl_mechanisms;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
const certAuth = this._auth;
|
|
515
|
-
if (certAuth.certificatePath || certAuth.keyPath) {
|
|
516
|
-
authOpts.certificate_path = certAuth.certificatePath;
|
|
517
|
-
authOpts.key_path = certAuth.keyPath;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
this._conn.connect(connStr, authOpts, this._dnsConfig, this._appTelemetryConfig, this._tracingConfig, this._orphanReporterConfig, this._metricsConfig, (cppErr) => {
|
|
628
|
+
const authOpts = this._getCppCredentials(this._auth, saslMechansims);
|
|
629
|
+
const [enableTracing, _enableMetrics] = this._setupObservability();
|
|
630
|
+
this._conn.connect(connStr, authOpts, this._dnsConfig, this._appTelemetryConfig, enableTracing, this._orphanReporterConfig, (cppErr) => {
|
|
521
631
|
if (cppErr) {
|
|
522
632
|
const err = (0, bindingutilities_1.errorFromCpp)(cppErr);
|
|
523
633
|
return reject(err);
|
package/dist/collection.d.ts
CHANGED
|
@@ -7,11 +7,14 @@ import { CounterResult, ExistsResult, GetReplicaResult, GetResult, LookupInResul
|
|
|
7
7
|
import { CouchbaseList, CouchbaseMap, CouchbaseQueue, CouchbaseSet } from './datastructures';
|
|
8
8
|
import { DurabilityLevel, ReadPreference, StoreSemantics } from './generaltypes';
|
|
9
9
|
import { MutationState } from './mutationstate';
|
|
10
|
+
import { ObservableRequestHandler } from './observabilityhandler';
|
|
11
|
+
import { ObservabilityInstruments } from './observabilitytypes';
|
|
10
12
|
import { CollectionQueryIndexManager } from './queryindexmanager';
|
|
11
13
|
import { RangeScan, SamplingScan, PrefixScan } from './rangeScan';
|
|
12
14
|
import { Scope } from './scope';
|
|
13
15
|
import { LookupInSpec, MutateInSpec } from './sdspecs';
|
|
14
16
|
import { StreamableReplicasPromise, StreamableScanPromise } from './streamablepromises';
|
|
17
|
+
import { RequestSpan } from './tracing';
|
|
15
18
|
import { Transcoder } from './transcoders';
|
|
16
19
|
import { NodeCallback, CasInput } from './utilities';
|
|
17
20
|
/**
|
|
@@ -37,6 +40,10 @@ export interface GetOptions {
|
|
|
37
40
|
* The timeout for this operation, represented in milliseconds.
|
|
38
41
|
*/
|
|
39
42
|
timeout?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the parent span for this specific operation.
|
|
45
|
+
*/
|
|
46
|
+
parentSpan?: RequestSpan;
|
|
40
47
|
}
|
|
41
48
|
/**
|
|
42
49
|
* @category Key-Value
|
|
@@ -46,6 +53,10 @@ export interface ExistsOptions {
|
|
|
46
53
|
* The timeout for this operation, represented in milliseconds.
|
|
47
54
|
*/
|
|
48
55
|
timeout?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the parent span for this specific operation.
|
|
58
|
+
*/
|
|
59
|
+
parentSpan?: RequestSpan;
|
|
49
60
|
}
|
|
50
61
|
/**
|
|
51
62
|
* @category Key-Value
|
|
@@ -85,6 +96,10 @@ export interface InsertOptions {
|
|
|
85
96
|
* The timeout for this operation, represented in milliseconds.
|
|
86
97
|
*/
|
|
87
98
|
timeout?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Specifies the parent span for this specific operation.
|
|
101
|
+
*/
|
|
102
|
+
parentSpan?: RequestSpan;
|
|
88
103
|
}
|
|
89
104
|
/**
|
|
90
105
|
* @category Key-Value
|
|
@@ -128,6 +143,10 @@ export interface UpsertOptions {
|
|
|
128
143
|
* The timeout for this operation, represented in milliseconds.
|
|
129
144
|
*/
|
|
130
145
|
timeout?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the parent span for this specific operation.
|
|
148
|
+
*/
|
|
149
|
+
parentSpan?: RequestSpan;
|
|
131
150
|
}
|
|
132
151
|
/**
|
|
133
152
|
* @category Key-Value
|
|
@@ -176,6 +195,10 @@ export interface ReplaceOptions {
|
|
|
176
195
|
* The timeout for this operation, represented in milliseconds.
|
|
177
196
|
*/
|
|
178
197
|
timeout?: number;
|
|
198
|
+
/**
|
|
199
|
+
* Specifies the parent span for this specific operation.
|
|
200
|
+
*/
|
|
201
|
+
parentSpan?: RequestSpan;
|
|
179
202
|
}
|
|
180
203
|
/**
|
|
181
204
|
* @category Key-Value
|
|
@@ -206,6 +229,10 @@ export interface RemoveOptions {
|
|
|
206
229
|
* The timeout for this operation, represented in milliseconds.
|
|
207
230
|
*/
|
|
208
231
|
timeout?: number;
|
|
232
|
+
/**
|
|
233
|
+
* Specifies the parent span for this specific operation.
|
|
234
|
+
*/
|
|
235
|
+
parentSpan?: RequestSpan;
|
|
209
236
|
}
|
|
210
237
|
/**
|
|
211
238
|
* @category Key-Value
|
|
@@ -223,6 +250,10 @@ export interface GetAnyReplicaOptions {
|
|
|
223
250
|
* Specifies how replica nodes will be filtered.
|
|
224
251
|
*/
|
|
225
252
|
readPreference?: ReadPreference;
|
|
253
|
+
/**
|
|
254
|
+
* Specifies the parent span for this specific operation.
|
|
255
|
+
*/
|
|
256
|
+
parentSpan?: RequestSpan;
|
|
226
257
|
}
|
|
227
258
|
/**
|
|
228
259
|
* @category Key-Value
|
|
@@ -240,6 +271,10 @@ export interface GetAllReplicasOptions {
|
|
|
240
271
|
* Specifies how replica nodes will be filtered.
|
|
241
272
|
*/
|
|
242
273
|
readPreference?: ReadPreference;
|
|
274
|
+
/**
|
|
275
|
+
* Specifies the parent span for this specific operation.
|
|
276
|
+
*/
|
|
277
|
+
parentSpan?: RequestSpan;
|
|
243
278
|
}
|
|
244
279
|
/**
|
|
245
280
|
* @category Key-Value
|
|
@@ -253,6 +288,10 @@ export interface TouchOptions {
|
|
|
253
288
|
* The timeout for this operation, represented in milliseconds.
|
|
254
289
|
*/
|
|
255
290
|
timeout?: number;
|
|
291
|
+
/**
|
|
292
|
+
* Specifies the parent span for this specific operation.
|
|
293
|
+
*/
|
|
294
|
+
parentSpan?: RequestSpan;
|
|
256
295
|
}
|
|
257
296
|
/**
|
|
258
297
|
* @category Key-Value
|
|
@@ -266,6 +305,10 @@ export interface GetAndTouchOptions {
|
|
|
266
305
|
* The timeout for this operation, represented in milliseconds.
|
|
267
306
|
*/
|
|
268
307
|
timeout?: number;
|
|
308
|
+
/**
|
|
309
|
+
* Specifies the parent span for this specific operation.
|
|
310
|
+
*/
|
|
311
|
+
parentSpan?: RequestSpan;
|
|
269
312
|
}
|
|
270
313
|
/**
|
|
271
314
|
* @category Key-Value
|
|
@@ -279,6 +322,10 @@ export interface GetAndLockOptions {
|
|
|
279
322
|
* The timeout for this operation, represented in milliseconds.
|
|
280
323
|
*/
|
|
281
324
|
timeout?: number;
|
|
325
|
+
/**
|
|
326
|
+
* Specifies the parent span for this specific operation.
|
|
327
|
+
*/
|
|
328
|
+
parentSpan?: RequestSpan;
|
|
282
329
|
}
|
|
283
330
|
/**
|
|
284
331
|
* @category Key-Value
|
|
@@ -288,6 +335,10 @@ export interface UnlockOptions {
|
|
|
288
335
|
* The timeout for this operation, represented in milliseconds.
|
|
289
336
|
*/
|
|
290
337
|
timeout?: number;
|
|
338
|
+
/**
|
|
339
|
+
* Specifies the parent span for this specific operation.
|
|
340
|
+
*/
|
|
341
|
+
parentSpan?: RequestSpan;
|
|
291
342
|
}
|
|
292
343
|
/**
|
|
293
344
|
* @category Key-Value
|
|
@@ -303,6 +354,10 @@ export interface LookupInOptions {
|
|
|
303
354
|
* @internal
|
|
304
355
|
*/
|
|
305
356
|
accessDeleted?: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* Specifies the parent span for this specific operation.
|
|
359
|
+
*/
|
|
360
|
+
parentSpan?: RequestSpan;
|
|
306
361
|
}
|
|
307
362
|
/**
|
|
308
363
|
* @category Key-Value
|
|
@@ -316,6 +371,10 @@ export interface LookupInAnyReplicaOptions {
|
|
|
316
371
|
* Specifies how replica nodes will be filtered.
|
|
317
372
|
*/
|
|
318
373
|
readPreference?: ReadPreference;
|
|
374
|
+
/**
|
|
375
|
+
* Specifies the parent span for this specific operation.
|
|
376
|
+
*/
|
|
377
|
+
parentSpan?: RequestSpan;
|
|
319
378
|
}
|
|
320
379
|
/**
|
|
321
380
|
* @category Key-Value
|
|
@@ -329,6 +388,10 @@ export interface LookupInAllReplicasOptions {
|
|
|
329
388
|
* Specifies how replica nodes will be filtered.
|
|
330
389
|
*/
|
|
331
390
|
readPreference?: ReadPreference;
|
|
391
|
+
/**
|
|
392
|
+
* Specifies the parent span for this specific operation.
|
|
393
|
+
*/
|
|
394
|
+
parentSpan?: RequestSpan;
|
|
332
395
|
}
|
|
333
396
|
/**
|
|
334
397
|
* @category Key-Value
|
|
@@ -384,6 +447,10 @@ export interface MutateInOptions {
|
|
|
384
447
|
* @deprecated Use {@link MutateInOptions.storeSemantics} instead.
|
|
385
448
|
*/
|
|
386
449
|
upsertDocument?: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* Specifies the parent span for this specific operation.
|
|
452
|
+
*/
|
|
453
|
+
parentSpan?: RequestSpan;
|
|
387
454
|
}
|
|
388
455
|
/**
|
|
389
456
|
* @category Key-Value
|
|
@@ -459,6 +526,10 @@ export declare class Collection {
|
|
|
459
526
|
@internal
|
|
460
527
|
*/
|
|
461
528
|
get transcoder(): Transcoder;
|
|
529
|
+
/**
|
|
530
|
+
* @internal
|
|
531
|
+
*/
|
|
532
|
+
get observabilityInstruments(): ObservabilityInstruments;
|
|
462
533
|
/**
|
|
463
534
|
@internal
|
|
464
535
|
*/
|
|
@@ -507,10 +578,11 @@ export declare class Collection {
|
|
|
507
578
|
/**
|
|
508
579
|
* @internal
|
|
509
580
|
*/
|
|
510
|
-
_getReplica(key: string,
|
|
581
|
+
_getReplica(key: string, obsReqHandler: ObservableRequestHandler, options: {
|
|
511
582
|
transcoder?: Transcoder;
|
|
512
583
|
timeout?: number;
|
|
513
584
|
readPreference?: ReadPreference;
|
|
585
|
+
parentSpan?: RequestSpan;
|
|
514
586
|
}, callback?: NodeCallback<GetReplicaResult[]>): StreamableReplicasPromise<GetReplicaResult[], GetReplicaResult>;
|
|
515
587
|
/**
|
|
516
588
|
* Retrieves the value of the document from any of the available replicas. This
|
|
@@ -646,9 +718,10 @@ export declare class Collection {
|
|
|
646
718
|
/**
|
|
647
719
|
* @internal
|
|
648
720
|
*/
|
|
649
|
-
_lookupInReplica(key: string,
|
|
721
|
+
_lookupInReplica(key: string, obsReqHandler: ObservableRequestHandler, specs: LookupInSpec[], options: {
|
|
650
722
|
timeout?: number;
|
|
651
723
|
readPreference?: ReadPreference;
|
|
724
|
+
parentSpan?: RequestSpan;
|
|
652
725
|
}, callback?: NodeCallback<LookupInReplicaResult[]>): StreamableReplicasPromise<LookupInReplicaResult[], LookupInReplicaResult>;
|
|
653
726
|
/**
|
|
654
727
|
* Performs a lookup-in operation against a document, fetching individual fields or
|