MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / streamEncodeID

Function streamEncodeID

src/t_stream.cpp:371–376  ·  view source on GitHub ↗

Convert the specified stream entry ID as a 128 bit big endian number, so * that the IDs can be sorted lexicographically. */

Source from the content-addressed store, hash-verified

369/* Convert the specified stream entry ID as a 128 bit big endian number, so
370 * that the IDs can be sorted lexicographically. */
371void streamEncodeID(void *buf, streamID *id) {
372 uint64_t e[2];
373 e[0] = htonu64(id->ms);
374 e[1] = htonu64(id->seq);
375 memcpy(buf,e,sizeof(e));
376}
377
378/* This is the reverse of streamEncodeID(): the decoded ID will be stored
379 * in the 'id' structure passed by reference. The buffer 'buf' must point

Callers 9

streamAppendItemFunction · 0.85
streamIteratorStartFunction · 0.85
streamIteratorGetIDFunction · 0.85
streamReplyWithRangeFunction · 0.85
xackCommandFunction · 0.85
xpendingCommandFunction · 0.85
xclaimCommandFunction · 0.85
xautoclaimCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected