MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / GetExpvarAsInt

Function GetExpvarAsInt

base/util.go:916–922  ·  view source on GitHub ↗

Returns int representation of an expvar, given map name and key name

(mapName string, name string)

Source from the content-addressed store, hash-verified

914
915// Returns int representation of an expvar, given map name and key name
916func GetExpvarAsInt(mapName string, name string) (int, error) {
917 stringVal := GetExpvarAsString(mapName, name)
918 if stringVal == "" {
919 return 0, nil
920 }
921 return strconv.Atoi(stringVal)
922}
923
924// TODO: temporary workaround until https://issues.couchbase.com/browse/MB-27026 is implemented
925func ExtractExpiryFromDCPMutation(rq *gomemcached.MCRequest) (expiry uint32) {

Callers 1

Calls 1

GetExpvarAsStringFunction · 0.85

Tested by 1