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

Function checkForSentinelMode

src/server.cpp:7028–7035  ·  view source on GitHub ↗

Returns 1 if there is --sentinel among the arguments or if * argv[0] contains "keydb-sentinel". */

Source from the content-addressed store, hash-verified

7026/* Returns 1 if there is --sentinel among the arguments or if
7027 * argv[0] contains "keydb-sentinel". */
7028int checkForSentinelMode(int argc, char **argv) {
7029 int j;
7030
7031 if (strstr(argv[0],"keydb-sentinel") != NULL) return 1;
7032 for (j = 1; j < argc; j++)
7033 if (!strcmp(argv[j],"--sentinel")) return 1;
7034 return 0;
7035}
7036
7037/* Function called at startup to load RDB or AOF file in memory. */
7038void loadDataFromDisk(void) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected