github.com/koko1123/flow-go-1@v0.29.6/storage/badger/operation/chunk_locators.go (about)

     1  package operation
     2  
     3  import (
     4  	"github.com/dgraph-io/badger/v3"
     5  
     6  	"github.com/koko1123/flow-go-1/model/chunks"
     7  	"github.com/koko1123/flow-go-1/model/flow"
     8  )
     9  
    10  func InsertChunkLocator(locator *chunks.Locator) func(*badger.Txn) error {
    11  	return insert(makePrefix(codeChunk, locator.ID()), locator)
    12  }
    13  
    14  func RetrieveChunkLocator(locatorID flow.Identifier, locator *chunks.Locator) func(*badger.Txn) error {
    15  	return retrieve(makePrefix(codeChunk, locatorID), locator)
    16  }