+\h%dZddlmZddlZddlZddlmZmZmZddl m Z ddl m Z ddl mZddlmZdd lmZmZGd d Zy) zRepresent one server the driver is connected to. .. seealso:: This module is compatible with both the synchronous and asynchronous PyMongo APIs. ) annotationsN)AnyMappingOptional) EPOCH_NAIVE)ObjectId)Hello) SERVER_TYPE) ClusterTime_AddressceZdZUdZdZ d) d*dZed+dZed,dZed-dZ ed.dZ ed/d Z ed0d Z ed1d Z ed,d Zed,d Zed,dZed,dZed,dZed2dZed3dZed4dZed5dZed1dZed2dZed6dZed7dZed6dZed7dZed8dZed9dZed9dZed9dZ ed9dZ!ed9d Z"ed9d!Z#ed:d"Z$d;dServerDescriptionaRImmutable representation of one server. :param address: A (host, port) pair :param hello: Optional Hello instance :param round_trip_time: Optional float :param error: Optional, the last error attempting to connect to the server :param round_trip_time: Optional float, the min latency from the most recent samples )_address _server_type _all_hosts_tags_replica_set_name_primary_max_bson_size_max_message_size_max_write_batch_size_min_wire_version_max_wire_version_round_trip_time_min_round_trip_time_me _is_writable _is_readable_ls_timeout_minutes_error _set_version _election_id _cluster_time_last_write_date_last_update_time_topology_versionNc||_|s ti}|j|_|j|_|j |_|j|_ |j|_ |j|_ |j|_|j |_|j$|_|j(|_|j,|_|j0|_|j4|_|j8|_|j<|_|j@|_!||_"||_#|jH|_%tMjN|_(||_)|jT|_+|r3tY|dd}t[|t\r|j_d|_+||j`r)|j`tbz }|je|_3yd|_3y)NdetailstopologyVersion)4rr server_typer all_hostsrtagsrreplica_set_namerprimaryr max_bson_sizermax_message_sizermax_write_batch_sizermin_wire_versionrmax_wire_versionr set_versionr! election_idr" cluster_timer# is_writabler is_readablerlogical_session_timeout_minutesrrrmertime monotonicr%r topology_versionr&getattr isinstancedictgetlast_write_dater total_secondsr$)selfaddresshelloround_trip_timeerrormin_round_trip_timer(deltas ]/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pymongo/server_description.py__init__zServerDescription.__init__Es  "IE!--//ZZ !&!7!7  #11!&!7!7%*%?%?"!&!7!7!&!7!7!--!--"//!--!--#(#H#H /$7!88!%!1 !&!7!7 eY5G'4()05F)G&  ))K7E$)$7$7$9D !$(D !c|jS)z(The address (host, port) of this server.)rrDs rKrEzServerDescription.addresst}}rMc|jS)zThe type of this server.)rrOs rKr*zServerDescription.server_typeys   rMc<tj|jS)zSThe server type as a human readable string. .. versionadded:: 3.4 )r _fieldsrrOs rKserver_type_namez"ServerDescription.server_type_name~s ""4#4#455rMc|jS)z;List of hosts, passives, and arbiters known to this server.)rrOs rKr+zServerDescription.all_hostssrMc|jSN)rrOs rKr,zServerDescription.tagss zzrMc|jS)zReplica set name or None.)rrOs rKr-z"ServerDescription.replica_set_names%%%rMc|jS)z8This server's opinion about who the primary is, or None.)rrOs rKr.zServerDescription.primaryrPrMc|jSrW)rrOs rKr/zServerDescription.max_bson_sizes"""rMc|jSrW)rrOs rKr0z"ServerDescription.max_message_size%%%rMc|jSrW)rrOs rKr1z&ServerDescription.max_write_batch_sizes)))rMc|jSrW)rrOs rKr2z"ServerDescription.min_wire_versionr\rMc|jSrWrrOs rKr3z"ServerDescription.max_wire_versionr\rMc|jSrW)r!rOs rKr4zServerDescription.set_version   rMc|jSrW)r"rOs rKr5zServerDescription.election_idrbrMc|jSrW)r#rOs rKr6zServerDescription.cluster_times!!!rMcjtjdtd|j|jfS)NzL'election_tuple' is deprecated, use 'set_version' and 'election_id' instead) stacklevel)warningswarnDeprecationWarningr!r"rOs rKelection_tuplez ServerDescription.election_tuples0 Z    $"3"333rMc|jSrW)rrOs rKr:zServerDescription.mes xxrMc|jSrW)rrOs rKr9z1ServerDescription.logical_session_timeout_minutess'''rMc|jSrW)r$rOs rKrBz!ServerDescription.last_write_dates$$$rMc|jSrW)r%rOs rKlast_update_timez"ServerDescription.last_update_timer\rMc||j|jvr|j|jS|jS)z$The current average latency or None.)r_host_to_round_trip_timerrOs rKrGz!ServerDescription.round_trip_times7 ==D99 900? ?$$$rMc|jS)z-The min latency from the most recent samples.)rrOs rKrIz%ServerDescription.min_round_trip_times(((rMc|jS)z$($9$9!rMct|tr`|j|jk(xrD|j|j k(xr(|j |jk(xr |j|jk(xr|j|jk(xr|j|jk(xr|j|jk(xr|j |j"k(xr|j$|j&k(xrj|j(|j*k(xrO|j,|j.k(xr4|j0|j2k(xr|j4|j6k(St8SrW)r?rrrErr*rr2rr3rr:rr+rr,rr-r!r4r"r5rr.rr9r rHNotImplementedrDothers rK__eq__zServerDescription.__eq__ sV e. /%--/ 1&&%*;*;; 1++u/E/EE 1++u/E/EE 1XX) 1 __7 1 ZZ5::- 1++u/E/EE 1&&%*;*;; 1&&%*;*;; 1]]emm3 1--1V1VV 1[[EKK/  rMc||k( SrWrs rK__ne__zServerDescription.__ne__s5=  rMcd}|jrd|j}dj|jj|j|j |j |S)Nz, error=z"<{} {} server_type: {}, rtt: {}{}>)rHformat __class____name__rErTrG)rDerrmsgs rK__repr__zServerDescription.__repr__!sZ :: ~.F3:: NN # # LL  ! !     rMr@rr)NNNg) rEr rFzOptional[Hello]rGOptional[float]rHOptional[Exception]rIfloatreturnNone)rr )rint)rstr)rzset[tuple[str, int]])rzMapping[str, Any])rz Optional[str])rzOptional[tuple[str, int]])rz Optional[int])rzOptional[ObjectId])rzOptional[ClusterTime])rz(tuple[Optional[int], Optional[ObjectId]])rr)rr)rr)rbool)rzOptional[Mapping[str, Any]]rW)rHrrr)rrrr)+r __module__ __qualname____doc__ __slots__rLpropertyrEr*rTr+r,r-r.r/r0r1r2r3r4r5r6rkr:r9rBrprGrIrHr7r8ryr|rrr=rrrrrr__annotations__rrMrKrr sI<"&+/%)%( -)-)-)) -) # -) # -) -)^!!66&&##&&**&&&&!!!!""44((%%&&%%))!!!!7777;; ++&& (!  &(d'rMr)r __future__rr;rhtypingrrrbsonr bson.objectidr pymongo.hellor pymongo.server_typer pymongo.typingsr r rrrMrKrs6# ))"+1N(N(rM