fabric: github.com/hyperledger/fabric/core/ledger/pvtdatapolicy Index | Files | Directories

package pvtdatapolicy

import "github.com/hyperledger/fabric/core/ledger/pvtdatapolicy"


Package Files


func ComputeExpiringBlock Uses

func ComputeExpiringBlock(namesapce, collection string, committingBlock, btl uint64) uint64

type BTLPolicy Uses

type BTLPolicy interface {
    // GetBTL returns BlockToLive for a given namespace and collection
    GetBTL(ns string, coll string) (uint64, error)
    // GetExpiringBlock returns the block number by which the pvtdata for given namespace,collection, and committingBlock should expire
    GetExpiringBlock(namesapce string, collection string, committingBlock uint64) (uint64, error)

BTLPolicy BlockToLive policy for the pvt data

func ConstructBTLPolicy Uses

func ConstructBTLPolicy(collInfoProvider collectionInfoProvider) BTLPolicy

ConstructBTLPolicy constructs an instance of LSCCBasedBTLPolicy

type LSCCBasedBTLPolicy Uses

type LSCCBasedBTLPolicy struct {
    // contains filtered or unexported fields

LSCCBasedBTLPolicy implements interface BTLPolicy. This implementation loads the BTL policy from lscc namespace which is populated with the collection configuration during chaincode initialization

func (*LSCCBasedBTLPolicy) GetBTL Uses

func (p *LSCCBasedBTLPolicy) GetBTL(namesapce string, collection string) (uint64, error)

GetBTL implements corresponding function in interface `BTLPolicyMgr`

func (*LSCCBasedBTLPolicy) GetExpiringBlock Uses

func (p *LSCCBasedBTLPolicy) GetExpiringBlock(namesapce string, collection string, committingBlock uint64) (uint64, error)

GetExpiringBlock implements function from the interface `BTLPolicy`


mockCode generated by counterfeiter.

Package pvtdatapolicy imports 4 packages (graph) and is imported by 8 packages. Updated 2020-09-25. Refresh now. Tools for package owners.