GoLang log_reply

request it (314)
GoLang replacement for PHP's log_reply [edit | history]

Do you know a GoLang replacement for PHP's log_reply? Write it!

PHP log_reply

PHP original manual for log_reply [ show | php.net ]


(PECL mongo >= 1.5.0)

log_replyCallback When Reading the MongoDB reply


log_reply ( array $server , array $messageHeaders , array $operationHeaders )

A callable function, used by the log_reply context option, when reading a reply from MongoDB.


This is not a real function, only a prototype of how the function should be.



An array containing the basic information about the server that was picked.

key value
hash server hash, example: localhost:27017;-;X;56052
type Node type (primary/secondary/mongos/arbiter): 2
max_bson_size The maximum BSON Size over the wire this node accepts: 16777216
max_message_size The maximum Message Size over the wire this node accepts: 48000000
request_id The request identifier for this message: 42


key value
length integer, bytes, message reply length
request_id integer, the server request identifier
response_id integer, the driver request identifier this message is a response of
opcode integer, the opcode id


key value
flags integer, bitmask of protocol flags
cursor_id integer, ID of the cursor created on the server (0 if none created, or its been exhausted)
start The starting offset of this cursor
returned integer, how many documents are returned in this trip