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

Function getClientTypeByName

src/networking.cpp:3838–3845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3836}
3837
3838int getClientTypeByName(const char *name) {
3839 if (!strcasecmp(name,"normal")) return CLIENT_TYPE_NORMAL;
3840 else if (!strcasecmp(name,"slave")) return CLIENT_TYPE_SLAVE;
3841 else if (!strcasecmp(name,"replica")) return CLIENT_TYPE_SLAVE;
3842 else if (!strcasecmp(name,"pubsub")) return CLIENT_TYPE_PUBSUB;
3843 else if (!strcasecmp(name,"master")) return CLIENT_TYPE_MASTER;
3844 else return -1;
3845}
3846
3847const char *getClientTypeName(int clientType) {
3848 switch(clientType) {

Callers 3

configSetCommandFunction · 0.85
clientCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected