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

Function createClusterLink

src/cluster.cpp:652–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650 * -------------------------------------------------------------------------- */
651
652clusterLink *createClusterLink(clusterNode *node) {
653 clusterLink *link = (clusterLink*)zmalloc(sizeof(*link), MALLOC_LOCAL);
654 link->ctime = mstime();
655 link->sndbuf = sdsempty();
656 link->rcvbuf = (char*)zmalloc(link->rcvbuf_alloc = RCVBUF_INIT_LEN);
657 link->rcvbuf_len = 0;
658 link->node = node;
659 link->conn = NULL;
660 return link;
661}
662
663/* Free a cluster link, but does not free the associated node of course.
664 * This function will just make sure that the original node associated

Callers 2

clusterConnAcceptHandlerFunction · 0.85
clusterCronFunction · 0.85

Calls 3

zmallocFunction · 0.85
sdsemptyFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected