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

Method KeyMaskValue

base/log_keys.go:102–107  ·  view source on GitHub ↗

KeyMaskValue converts a log key index to the bitfield position. e.g. 0->0, 1->1, 2->2, 3->4, 4->8, 5->16...

()

Source from the content-addressed store, hash-verified

100// KeyMaskValue converts a log key index to the bitfield position.
101// e.g. 0->0, 1->1, 2->2, 3->4, 4->8, 5->16...
102func (i LogKey) KeyMaskValue() uint64 {
103 if i == 0 {
104 return 0
105 }
106 return 1 << (i - 1)
107}
108
109// Enable will enable the given logKey in keyMask.
110func (keyMask *LogKeyMask) Enable(logKey LogKey) {

Callers 3

EnableMethod · 0.80
DisableMethod · 0.80
enabledMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected