MCPcopy Create free account
hub / github.com/couchbase/moss / Get

Method Get

segment.go:398–409  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

396}
397
398func (a *segment) Get(key []byte) (operation uint64, val []byte, err error) {
399 var pos int
400 pos, err = a.findKeyPos(key)
401 if err != nil {
402 return
403 }
404
405 if pos >= 0 {
406 operation, _, val = a.getOperationKeyVal(pos)
407 }
408 return
409}
410
411// Searches for the key within the in-memory index of the segment
412// if available. Returns left and right positions between which

Callers

nothing calls this directly

Calls 2

findKeyPosMethod · 0.95
getOperationKeyValMethod · 0.95

Tested by

no test coverage detected