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

Function streamCreateNACK

src/t_stream.cpp:2240–2246  ·  view source on GitHub ↗

Create a NACK entry setting the delivery count to 1 and the delivery * time to the current time. The NACK consumer will be set to the one * specified as argument of the function. */

Source from the content-addressed store, hash-verified

2238 * time to the current time. The NACK consumer will be set to the one
2239 * specified as argument of the function. */
2240streamNACK *streamCreateNACK(streamConsumer *consumer) {
2241 streamNACK *nack = (streamNACK*)zmalloc(sizeof(*nack), MALLOC_SHARED);
2242 nack->delivery_time = mstime();
2243 nack->delivery_count = 1;
2244 nack->consumer = consumer;
2245 return nack;
2246}
2247
2248/* Free a NACK entry. */
2249void streamFreeNACK(streamNACK *na) {

Callers 4

rdbLoadObjectFunction · 0.85
streamDupFunction · 0.85
streamReplyWithRangeFunction · 0.85
xclaimCommandFunction · 0.85

Calls 2

zmallocFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected