Module: Mongo
- Extended by:
- Forwardable
- Defined in:
- lib/mongo/id.rb,
lib/mongo.rb,
lib/mongo/uri.rb,
lib/mongo/auth.rb,
lib/mongo/lint.rb,
lib/mongo/crypt.rb,
lib/mongo/dbref.rb,
lib/mongo/error.rb,
lib/mongo/event.rb,
lib/mongo/index.rb,
lib/mongo/utils.rb,
lib/mongo/client.rb,
lib/mongo/config.rb,
lib/mongo/cursor.rb,
lib/mongo/logger.rb,
lib/mongo/server.rb,
lib/mongo/socket.rb,
lib/mongo/address.rb,
lib/mongo/auth/cr.rb,
lib/mongo/cluster.rb,
lib/mongo/session.rb,
lib/mongo/timeout.rb,
lib/mongo/version.rb,
lib/mongo/auth/aws.rb,
lib/mongo/database.rb,
lib/mongo/loggable.rb,
lib/mongo/auth/base.rb,
lib/mongo/auth/ldap.rb,
lib/mongo/auth/user.rb,
lib/mongo/auth/x509.rb,
lib/mongo/crypt/kms.rb,
lib/mongo/grid/file.rb,
lib/mongo/operation.rb,
lib/mongo/retryable.rb,
lib/mongo/semaphore.rb,
lib/mongo/auth/roles.rb,
lib/mongo/auth/scram.rb,
lib/mongo/bulk_write.rb,
lib/mongo/collection.rb,
lib/mongo/event/base.rb,
lib/mongo/index/view.rb,
lib/mongo/monitoring.rb,
lib/mongo/socket/ssl.rb,
lib/mongo/socket/tcp.rb,
lib/mongo/srv/result.rb,
lib/mongo/auth/gssapi.rb,
lib/mongo/crypt/hooks.rb,
lib/mongo/cursor_host.rb,
lib/mongo/grid/stream.rb,
lib/mongo/query_cache.rb,
lib/mongo/socket/unix.rb,
lib/mongo/srv/monitor.rb,
lib/mongo/address/ipv4.rb,
lib/mongo/address/ipv6.rb,
lib/mongo/address/unix.rb,
lib/mongo/cluster_time.rb,
lib/mongo/crypt/binary.rb,
lib/mongo/crypt/handle.rb,
lib/mongo/crypt/status.rb,
lib/mongo/error/parser.rb,
lib/mongo/protocol/msg.rb,
lib/mongo/srv/resolver.rb,
lib/mongo/auth/scram256.rb,
lib/mongo/crypt/binding.rb,
lib/mongo/crypt/context.rb,
lib/mongo/database/view.rb,
lib/mongo/error/notable.rb,
lib/mongo/write_concern.rb,
lib/mongo/auth/user/view.rb,
lib/mongo/caching_cursor.rb,
lib/mongo/config/options.rb,
lib/mongo/grid/file/info.rb,
lib/mongo/grid/fs_bucket.rb,
lib/mongo/operation/drop.rb,
lib/mongo/operation/find.rb,
lib/mongo/options/mapper.rb,
lib/mongo/protocol/query.rb,
lib/mongo/protocol/reply.rb,
lib/mongo/server/monitor.rb,
lib/mongo/auth/stringprep.rb,
lib/mongo/collection/view.rb,
lib/mongo/error/kms_error.rb,
lib/mongo/error/labelable.rb,
lib/mongo/event/listeners.rb,
lib/mongo/event/publisher.rb,
lib/mongo/grid/file/chunk.rb,
lib/mongo/operation/count.rb,
lib/mongo/server_selector.rb,
lib/mongo/auth/aws/request.rb,
lib/mongo/cluster/topology.rb,
lib/mongo/cluster/topology.rb,
lib/mongo/cursor/kill_spec.rb,
lib/mongo/error/auth_error.rb,
lib/mongo/error/lint_error.rb,
lib/mongo/error/pool_error.rb,
lib/mongo/event/subscriber.rb,
lib/mongo/grid/stream/read.rb,
lib/mongo/operation/create.rb,
lib/mongo/operation/delete.rb,
lib/mongo/operation/insert.rb,
lib/mongo/operation/result.rb,
lib/mongo/operation/update.rb,
lib/mongo/options/redacted.rb,
lib/mongo/protocol/message.rb,
lib/mongo/topology_version.rb,
lib/mongo/uri/srv_protocol.rb,
lib/mongo/address/validator.rb,
lib/mongo/background_thread.rb,
lib/mongo/bulk_write/result.rb,
lib/mongo/client_encryption.rb,
lib/mongo/crypt/kms_context.rb,
lib/mongo/error/crypt_error.rb,
lib/mongo/error/invalid_uri.rb,
lib/mongo/grid/stream/write.rb,
lib/mongo/operation/command.rb,
lib/mongo/operation/context.rb,
lib/mongo/operation/explain.rb,
lib/mongo/operation/indexes.rb,
lib/mongo/protocol/get_more.rb,
lib/mongo/protocol/registry.rb,
lib/mongo/search_index/view.rb,
lib/mongo/server/connection.rb,
lib/mongo/socket/ocsp_cache.rb,
lib/mongo/collection/helpers.rb,
lib/mongo/condition_variable.rb,
lib/mongo/cursor/nontailable.rb,
lib/mongo/error/invalid_file.rb,
lib/mongo/error/socket_error.rb,
lib/mongo/operation/distinct.rb,
lib/mongo/operation/get_more.rb,
lib/mongo/server/description.rb,
lib/mongo/uri/options_mapper.rb,
lib/mongo/write_concern/base.rb,
lib/mongo/crypt/encryption_io.rb,
lib/mongo/csot_timeout_holder.rb,
lib/mongo/error/client_closed.rb,
lib/mongo/error/closed_stream.rb,
lib/mongo/error/invalid_nonce.rb,
lib/mongo/error/max_bson_size.rb,
lib/mongo/error/session_ended.rb,
lib/mongo/error/timeout_error.rb,
lib/mongo/operation/aggregate.rb,
lib/mongo/protocol/bit_vector.rb,
lib/mongo/protocol/compressed.rb,
lib/mongo/server/app_metadata.rb,
lib/mongo/server/push_monitor.rb,
lib/mongo/auth/aws/credentials.rb,
lib/mongo/auth/cr/conversation.rb,
lib/mongo/crypt/auto_encrypter.rb,
lib/mongo/error/file_not_found.rb,
lib/mongo/error/no_srv_records.rb,
lib/mongo/operation/drop_index.rb,
lib/mongo/operation/map_reduce.rb,
lib/mongo/operation/users_info.rb,
lib/mongo/protocol/serializers.rb,
lib/mongo/server_selector/base.rb,
lib/mongo/session/session_pool.rb,
lib/mongo/socket/ocsp_verifier.rb,
lib/mongo/auth/aws/conversation.rb,
lib/mongo/auth/credential_cache.rb,
lib/mongo/cluster/topology/base.rb,
lib/mongo/crypt/kms/credentials.rb,
lib/mongo/error/handshake_error.rb,
lib/mongo/error/invalid_address.rb,
lib/mongo/error/invalid_session.rb,
lib/mongo/error/write_retryable.rb,
lib/mongo/operation/create_user.rb,
lib/mongo/operation/drop/op_msg.rb,
lib/mongo/operation/find/op_msg.rb,
lib/mongo/operation/find/result.rb,
lib/mongo/operation/op_msg_base.rb,
lib/mongo/operation/remove_user.rb,
lib/mongo/operation/update_user.rb,
lib/mongo/protocol/caching_hash.rb,
lib/mongo/protocol/kill_cursors.rb,
lib/mongo/retryable/base_worker.rb,
lib/mongo/retryable/read_worker.rb,
lib/mongo/auth/conversation_base.rb,
lib/mongo/auth/ldap/conversation.rb,
lib/mongo/auth/stringprep/tables.rb,
lib/mongo/auth/x509/conversation.rb,
lib/mongo/bulk_write/combineable.rb,
lib/mongo/bulk_write/validatable.rb,
lib/mongo/crypt/data_key_context.rb,
lib/mongo/error/bulk_write_error.rb,
lib/mongo/error/extra_file_chunk.rb,
lib/mongo/error/invalid_document.rb,
lib/mongo/error/max_message_size.rb,
lib/mongo/error/missing_password.rb,
lib/mongo/error/multi_index_drop.rb,
lib/mongo/error/unmet_dependency.rb,
lib/mongo/monitoring/publishable.rb,
lib/mongo/operation/count/op_msg.rb,
lib/mongo/operation/create_index.rb,
lib/mongo/operation/kill_cursors.rb,
lib/mongo/operation/shared/timed.rb,
lib/mongo/operation/shared/write.rb,
lib/mongo/retryable/write_worker.rb,
lib/mongo/server/connection_base.rb,
lib/mongo/server/connection_pool.rb,
lib/mongo/session/server_session.rb,
lib/mongo/auth/scram/conversation.rb,
lib/mongo/cluster/topology/single.rb,
lib/mongo/error/invalid_signature.rb,
lib/mongo/error/mismatched_domain.rb,
lib/mongo/error/operation_failure.rb,
lib/mongo/error/pool_closed_error.rb,
lib/mongo/error/pool_paused_error.rb,
lib/mongo/error/server_not_usable.rb,
lib/mongo/monitoring/event/secure.rb,
lib/mongo/operation/create/op_msg.rb,
lib/mongo/operation/delete/op_msg.rb,
lib/mongo/operation/delete/result.rb,
lib/mongo/operation/drop_database.rb,
lib/mongo/operation/insert/op_msg.rb,
lib/mongo/operation/insert/result.rb,
lib/mongo/operation/parallel_scan.rb,
lib/mongo/operation/shared/idable.rb,
lib/mongo/operation/update/op_msg.rb,
lib/mongo/operation/update/result.rb,
lib/mongo/operation/write_command.rb,
lib/mongo/server_selector/nearest.rb,
lib/mongo/server_selector/primary.rb,
lib/mongo/auth/gssapi/conversation.rb,
lib/mongo/bulk_write/transformable.rb,
lib/mongo/cluster/topology/sharded.rb,
lib/mongo/cluster/topology/unknown.rb,
lib/mongo/collection/view/iterable.rb,
lib/mongo/collection/view/readable.rb,
lib/mongo/collection/view/writable.rb,
lib/mongo/config/validators/option.rb,
lib/mongo/crypt/explicit_encrypter.rb,
lib/mongo/distinguishing_semaphore.rb,
lib/mongo/error/invalid_txt_record.rb,
lib/mongo/error/missing_connection.rb,
lib/mongo/error/missing_file_chunk.rb,
lib/mongo/error/missing_service_id.rb,
lib/mongo/error/pool_cleared_error.rb,
lib/mongo/error/unsupported_option.rb,
lib/mongo/operation/command/op_msg.rb,
lib/mongo/operation/explain/op_msg.rb,
lib/mongo/operation/explain/result.rb,
lib/mongo/operation/indexes/op_msg.rb,
lib/mongo/operation/indexes/result.rb,
lib/mongo/operation/shared/limited.rb,
lib/mongo/server/connection_common.rb,
lib/mongo/cluster/periodic_executor.rb,
lib/mongo/collection/view/immutable.rb,
lib/mongo/crypt/kms/aws/credentials.rb,
lib/mongo/crypt/kms/gcp/credentials.rb,
lib/mongo/error/connection_perished.rb,
lib/mongo/error/invalid_read_option.rb,
lib/mongo/error/need_primary_server.rb,
lib/mongo/error/no_server_available.rb,
lib/mongo/error/server_api_conflict.rb,
lib/mongo/error/unexpected_response.rb,
lib/mongo/operation/distinct/op_msg.rb,
lib/mongo/operation/get_more/op_msg.rb,
lib/mongo/operation/get_more/result.rb,
lib/mongo/server/monitor/connection.rb,
lib/mongo/server/pending_connection.rb,
lib/mongo/server_selector/secondary.rb,
lib/mongo/auth/aws/credentials_cache.rb,
lib/mongo/auth/scram256/conversation.rb,
lib/mongo/bulk_write/result_combiner.rb,
lib/mongo/collection/view/map_reduce.rb,
lib/mongo/crypt/kms/kmip/credentials.rb,
lib/mongo/error/invalid_read_concern.rb,
lib/mongo/error/missing_resume_token.rb,
lib/mongo/error/raise_original_error.rb,
lib/mongo/error/read_write_retryable.rb,
lib/mongo/error/sdam_error_detection.rb,
lib/mongo/error/server_timeout_error.rb,
lib/mongo/error/socket_timeout_error.rb,
lib/mongo/error/unknown_payload_type.rb,
lib/mongo/error/unsupported_features.rb,
lib/mongo/monitoring/event/cmap/base.rb,
lib/mongo/operation/aggregate/op_msg.rb,
lib/mongo/operation/aggregate/result.rb,
lib/mongo/operation/collections_info.rb,
lib/mongo/operation/list_collections.rb,
lib/mongo/write_concern/acknowledged.rb,
lib/mongo/auth/sasl_conversation_base.rb,
lib/mongo/bulk_write/ordered_combiner.rb,
lib/mongo/collection/view/aggregation.rb,
lib/mongo/collection/view/explainable.rb,
lib/mongo/crypt/kms/azure/credentials.rb,
lib/mongo/crypt/kms/local/credentials.rb,
lib/mongo/error/internal_driver_error.rb,
lib/mongo/error/invalid_config_option.rb,
lib/mongo/error/invalid_database_name.rb,
lib/mongo/error/invalid_file_revision.rb,
lib/mongo/error/invalid_min_pool_size.rb,
lib/mongo/error/invalid_write_concern.rb,
lib/mongo/error/unsupported_collation.rb,
lib/mongo/operation/drop_index/op_msg.rb,
lib/mongo/operation/drop_search_index.rb,
lib/mongo/operation/map_reduce/op_msg.rb,
lib/mongo/operation/map_reduce/result.rb,
lib/mongo/operation/shared/executable.rb,
lib/mongo/operation/users_info/op_msg.rb,
lib/mongo/operation/users_info/result.rb,
lib/mongo/server/description/features.rb,
lib/mongo/server/monitor/app_metadata.rb,
lib/mongo/auth/scram_conversation_base.rb,
lib/mongo/crypt/kms/azure/access_token.rb,
lib/mongo/error/connection_unavailable.rb,
lib/mongo/error/credential_check_error.rb,
lib/mongo/error/invalid_bulk_operation.rb,
lib/mongo/error/invalid_max_connecting.rb,
lib/mongo/error/sessions_not_supported.rb,
lib/mongo/operation/create_user/op_msg.rb,
lib/mongo/operation/delete/bulk_result.rb,
lib/mongo/operation/find/builder/flags.rb,
lib/mongo/operation/insert/bulk_result.rb,
lib/mongo/operation/remove_user/op_msg.rb,
lib/mongo/operation/shared/specifiable.rb,
lib/mongo/operation/shared/validatable.rb,
lib/mongo/operation/update/bulk_result.rb,
lib/mongo/operation/update_user/op_msg.rb,
lib/mongo/server/app_metadata/platform.rb,
lib/mongo/write_concern/unacknowledged.rb,
lib/mongo/auth/stringprep/profiles/sasl.rb,
lib/mongo/bulk_write/unordered_combiner.rb,
lib/mongo/cluster/reapers/cursor_reaper.rb,
lib/mongo/cluster/reapers/socket_reaper.rb,
lib/mongo/collection/view/change_stream.rb,
lib/mongo/crypt/auto_decryption_context.rb,
lib/mongo/crypt/auto_encryption_context.rb,
lib/mongo/crypt/kms/aws/master_document.rb,
lib/mongo/crypt/kms/gcp/master_document.rb,
lib/mongo/crypt/kms/master_key_document.rb,
lib/mongo/error/change_stream_resumable.rb,
lib/mongo/error/invalid_collection_name.rb,
lib/mongo/error/invalid_update_document.rb,
lib/mongo/error/mongocryptd_spawn_error.rb,
lib/mongo/error/unexpected_chunk_length.rb,
lib/mongo/operation/create_index/op_msg.rb,
lib/mongo/operation/kill_cursors/op_msg.rb,
lib/mongo/operation/update_search_index.rb,
lib/mongo/server/app_metadata/truncator.rb,
lib/mongo/auth/aws/credentials_retriever.rb,
lib/mongo/cluster/topology/load_balanced.rb,
lib/mongo/crypt/kms/kmip/master_document.rb,
lib/mongo/error/bad_load_balancer_target.rb,
lib/mongo/error/invalid_application_name.rb,
lib/mongo/error/invalid_cursor_operation.rb,
lib/mongo/error/invalid_server_auth_host.rb,
lib/mongo/error/server_api_not_supported.rb,
lib/mongo/error/session_not_materialized.rb,
lib/mongo/error/unsupported_message_type.rb,
lib/mongo/monitoring/cmap_log_subscriber.rb,
lib/mongo/monitoring/event/server_closed.rb,
lib/mongo/monitoring/sdam_log_subscriber.rb,
lib/mongo/operation/drop_database/op_msg.rb,
lib/mongo/operation/find/builder/command.rb,
lib/mongo/operation/parallel_scan/op_msg.rb,
lib/mongo/operation/parallel_scan/result.rb,
lib/mongo/operation/write_command/op_msg.rb,
lib/mongo/server/push_monitor/connection.rb,
lib/mongo/collection/queryable_encryption.rb,
lib/mongo/crypt/kms/azure/master_document.rb,
lib/mongo/crypt/kms/local/master_document.rb,
lib/mongo/error/invalid_server_preference.rb,
lib/mongo/error/unsupported_array_filters.rb,
lib/mongo/monitoring/event/command_failed.rb,
lib/mongo/monitoring/event/server_opening.rb,
lib/mongo/operation/create_search_indexes.rb,
lib/mongo/server/app_metadata/environment.rb,
lib/mongo/error/server_certificate_revoked.rb,
lib/mongo/error/transactions_not_supported.rb,
lib/mongo/monitoring/event/cmap/pool_ready.rb,
lib/mongo/monitoring/event/command_started.rb,
lib/mongo/monitoring/event/topology_closed.rb,
lib/mongo/operation/find/builder/modifiers.rb,
lib/mongo/server/connection_pool/populator.rb,
lib/mongo/server/description/load_balancer.rb,
lib/mongo/session/server_session/dirtyable.rb,
lib/mongo/crypt/explicit_decryption_context.rb,
lib/mongo/crypt/explicit_encryption_context.rb,
lib/mongo/crypt/rewrap_many_data_key_result.rb,
lib/mongo/error/invalid_bulk_operation_type.rb,
lib/mongo/monitoring/command_log_subscriber.rb,
lib/mongo/monitoring/event/cmap/pool_closed.rb,
lib/mongo/monitoring/event/topology_changed.rb,
lib/mongo/monitoring/event/topology_opening.rb,
lib/mongo/operation/collections_info/result.rb,
lib/mongo/operation/list_collections/op_msg.rb,
lib/mongo/operation/list_collections/result.rb,
lib/mongo/server/round_trip_time_calculator.rb,
lib/mongo/server_selector/primary_preferred.rb,
lib/mongo/collection/view/builder/map_reduce.rb,
lib/mongo/crypt/rewrap_many_data_key_context.rb,
lib/mongo/error/connection_check_out_timeout.rb,
lib/mongo/error/insufficient_iteration_count.rb,
lib/mongo/error/invalid_replacement_document.rb,
lib/mongo/error/invalid_server_auth_response.rb,
lib/mongo/monitoring/event/cmap/pool_cleared.rb,
lib/mongo/monitoring/event/cmap/pool_created.rb,
lib/mongo/monitoring/event/command_succeeded.rb,
lib/mongo/operation/drop_search_index/op_msg.rb,
lib/mongo/operation/get_more/command_builder.rb,
lib/mongo/operation/shared/op_msg_executable.rb,
lib/mongo/operation/shared/response_handling.rb,
lib/mongo/collection/view/builder/aggregation.rb,
lib/mongo/crypt/kms/gcp/credentials_retriever.rb,
lib/mongo/error/failed_string_prep_validation.rb,
lib/mongo/error/invalid_transaction_operation.rb,
lib/mongo/operation/shared/polymorphic_lookup.rb,
lib/mongo/operation/shared/polymorphic_result.rb,
lib/mongo/operation/shared/sessions_supported.rb,
lib/mongo/server_selector/secondary_preferred.rb,
lib/mongo/collection/view/aggregation/behavior.rb,
lib/mongo/error/missing_scram_server_signature.rb,
lib/mongo/error/unchangeable_collection_option.rb,
lib/mongo/operation/shared/object_id_generator.rb,
lib/mongo/operation/shared/result/aggregatable.rb,
lib/mongo/operation/update_search_index/op_msg.rb,
lib/mongo/crypt/kms/azure/credentials_retriever.rb,
lib/mongo/error/no_service_connection_available.rb,
lib/mongo/monitoring/event/cmap/connection_ready.rb,
lib/mongo/monitoring/unified_sdam_log_subscriber.rb,
lib/mongo/operation/create_search_indexes/op_msg.rb,
lib/mongo/operation/kill_cursors/command_builder.rb,
lib/mongo/cluster/topology/no_replica_set_options.rb,
lib/mongo/cluster/topology/replica_set_no_primary.rb,
lib/mongo/collection/view/change_stream/retryable.rb,
lib/mongo/monitoring/event/cmap/connection_closed.rb,
lib/mongo/monitoring/server_closed_log_subscriber.rb,
lib/mongo/operation/shared/executable_no_validate.rb,
lib/mongo/monitoring/event/cmap/connection_created.rb,
lib/mongo/monitoring/event/server_heartbeat_failed.rb,
lib/mongo/monitoring/server_opening_log_subscriber.rb,
lib/mongo/operation/shared/write_concern_supported.rb,
lib/mongo/cluster/topology/replica_set_with_primary.rb,
lib/mongo/monitoring/event/server_heartbeat_started.rb,
lib/mongo/monitoring/topology_closed_log_subscriber.rb,
lib/mongo/server/connection_pool/generation_manager.rb,
lib/mongo/monitoring/topology_changed_log_subscriber.rb,
lib/mongo/monitoring/topology_opening_log_subscriber.rb,
lib/mongo/operation/shared/read_preference_supported.rb,
lib/mongo/monitoring/event/cmap/connection_checked_in.rb,
lib/mongo/monitoring/event/server_description_changed.rb,
lib/mongo/monitoring/event/server_heartbeat_succeeded.rb,
lib/mongo/operation/shared/bypass_document_validation.rb,
lib/mongo/crypt/explicit_encryption_expression_context.rb,
lib/mongo/monitoring/event/cmap/connection_checked_out.rb,
lib/mongo/error/snapshot_session_invalid_server_version.rb,
lib/mongo/error/snapshot_session_transaction_prohibited.rb,
lib/mongo/operation/shared/causal_consistency_supported.rb,
lib/mongo/operation/shared/executable_transaction_label.rb,
lib/mongo/operation/shared/result/use_legacy_error_parser.rb,
lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb,
lib/mongo/monitoring/event/cmap/connection_check_out_started.rb,
lib/mongo/monitoring/server_description_changed_log_subscriber.rb
Overview
Copyright © 2016-2020 MongoDB Inc.
Licensed under the Apache License, Version 2.0 (the ‘License’); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ‘AS IS’ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: Auth, BackgroundThread, Config, Crypt, CursorHost, Event, Grid, Id, Index, Lint, Loggable, Operation, Options, Protocol, QueryCache, Retryable, SearchIndex, ServerSelector, Srv, Timeout, Utils, WriteConcern Classes: Address, BulkWrite, CachingCursor, Client, ClientEncryption, Cluster, ClusterTime, Collection, ConditionVariable, CsotTimeoutHolder, Cursor, Database, DistinguishingSemaphore, Error, Logger, Monitoring, Semaphore, Server, Session, Socket, TopologyVersion, URI
Constant Summary collapse
- DBRef =
BSON::DBRef
- VERSION =
The current version of the driver.
'2.21.0'
Class Method Summary collapse
-
.clear_ocsp_cache ⇒ Object
Clears the driver’s OCSP response cache.
-
.delegate_option(obj, opt) ⇒ Object
Delegate the given option along with its = and ? methods to the given object.
-
.tls_context_hooks ⇒ Array<Proc>
This is a user-settable list of hooks that will be invoked when any new TLS socket is connected.
-
.tls_context_hooks=(hooks) ⇒ Object
Set the TLS context hooks.
Class Method Details
.clear_ocsp_cache ⇒ Object
Clears the driver’s OCSP response cache.
106 107 108 |
# File 'lib/mongo.rb', line 106 module_function def clear_ocsp_cache Socket::OcspCache.clear end |
.delegate_option(obj, opt) ⇒ Object
Delegate the given option along with its = and ? methods to the given object.
93 94 95 |
# File 'lib/mongo.rb', line 93 def self.delegate_option(obj, opt) def_delegators obj, opt, "#{opt}=", "#{opt}?" end |
.tls_context_hooks ⇒ Array<Proc>
This is a user-settable list of hooks that will be invoked when any new TLS socket is connected. Each hook should be a Proc that takes an OpenSSL::SSL::SSLContext object as an argument. These hooks can be used to modify the TLS context (for example to disallow certain ciphers).
117 118 119 |
# File 'lib/mongo.rb', line 117 module_function def tls_context_hooks @tls_context_hooks ||= [] end |
.tls_context_hooks=(hooks) ⇒ Object
Set the TLS context hooks.
125 126 127 128 129 130 131 |
# File 'lib/mongo.rb', line 125 module_function def tls_context_hooks=(hooks) unless hooks.is_a?(Array) && hooks.all? { |hook| hook.is_a?(Proc) } raise ArgumentError, "TLS context hooks must be an array of Procs" end @tls_context_hooks = hooks end |