MCPcopy Create free account
hub / github.com/apache/brpc / FindChecksumHandler

Function FindChecksumHandler

src/brpc/checksum.cpp:48–58  ·  view source on GitHub ↗

Find ChecksumHandler by type. Returns NULL if not found

Source from the content-addressed store, hash-verified

46// Find ChecksumHandler by type.
47// Returns NULL if not found
48inline const ChecksumHandler* FindChecksumHandler(ChecksumType type) {
49 int index = type;
50 if (index < 0 || index >= MAX_HANDLER_SIZE) {
51 LOG(ERROR) << "ChecksumType=" << type << " is out of range";
52 return NULL;
53 }
54 if (NULL == s_handler_map[index].Compute) {
55 return NULL;
56 }
57 return &s_handler_map[index];
58}
59
60const char* ChecksumTypeToCStr(ChecksumType type) {
61 if (type == CHECKSUM_TYPE_NONE) {

Callers 3

ChecksumTypeToCStrFunction · 0.85
ComputeDataChecksumFunction · 0.85
VerifyDataChecksumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected