MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / hello_cmd

Method hello_cmd

pymongo/asynchronous/pool.py:237–244  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

235 await self.close_conn(ConnectionClosedReason.STALE)
236
237 def hello_cmd(self) -> dict[str, Any]:
238 # Handshake spec requires us to use OP_MSG+hello command for the
239 # initial handshake in load balanced or stable API mode.
240 if self.opts.server_api or self.hello_ok or self.opts.load_balanced:
241 self.op_msg_enabled = True
242 return {HelloCompat.CMD: 1}
243 else:
244 return {HelloCompat.LEGACY_CMD: 1, "helloOk": True}
245
246 async def hello(self) -> Hello[dict[str, Any]]:
247 return await self._hello(None, None)

Callers 2

_helloMethod · 0.95
_authenticate_defaultFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected