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

Function sentinelGetMasterByName

src/sentinel.cpp:1521–1528  ·  view source on GitHub ↗

Master lookup by name */

Source from the content-addressed store, hash-verified

1519
1520/* Master lookup by name */
1521sentinelRedisInstance *sentinelGetMasterByName(char *name) {
1522 sentinelRedisInstance *ri;
1523 sds sdsname = sdsnew(name);
1524
1525 ri = (sentinelRedisInstance*)dictFetchValue(sentinel.masters,sdsname);
1526 sdsfree(sdsname);
1527 return ri;
1528}
1529
1530/* Add the specified flags to all the instances in the specified dictionary. */
1531void sentinelAddFlagsToDictOfRedisInstances(dict *instances, int flags) {

Callers 3

sentinelCommandFunction · 0.85

Calls 3

sdsnewFunction · 0.85
dictFetchValueFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected