...

Package pvtstatepurgemgmt

import "github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/pvtstatepurgemgmt"
Overview
Index

Overview ▾

Index ▾

type Collections
    func (*Collections) Descriptor() ([]byte, []int)
    func (m *Collections) GetMap() map[string]*KeysAndHashes
    func (*Collections) ProtoMessage()
    func (m *Collections) Reset()
    func (m *Collections) String() string
    func (m *Collections) XXX_DiscardUnknown()
    func (m *Collections) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
    func (dst *Collections) XXX_Merge(src proto.Message)
    func (m *Collections) XXX_Size() int
    func (m *Collections) XXX_Unmarshal(b []byte) error
type KeyAndHash
    func (*KeyAndHash) Descriptor() ([]byte, []int)
    func (m *KeyAndHash) GetHash() []byte
    func (m *KeyAndHash) GetKey() string
    func (*KeyAndHash) ProtoMessage()
    func (m *KeyAndHash) Reset()
    func (m *KeyAndHash) String() string
    func (m *KeyAndHash) XXX_DiscardUnknown()
    func (m *KeyAndHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
    func (dst *KeyAndHash) XXX_Merge(src proto.Message)
    func (m *KeyAndHash) XXX_Size() int
    func (m *KeyAndHash) XXX_Unmarshal(b []byte) error
type KeysAndHashes
    func (*KeysAndHashes) Descriptor() ([]byte, []int)
    func (m *KeysAndHashes) GetList() []*KeyAndHash
    func (*KeysAndHashes) ProtoMessage()
    func (m *KeysAndHashes) Reset()
    func (m *KeysAndHashes) String() string
    func (m *KeysAndHashes) XXX_DiscardUnknown()
    func (m *KeysAndHashes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
    func (dst *KeysAndHashes) XXX_Merge(src proto.Message)
    func (m *KeysAndHashes) XXX_Size() int
    func (m *KeysAndHashes) XXX_Unmarshal(b []byte) error
type PurgeMgr
    func InstantiatePurgeMgr(ledgerid string, db privacyenabledstate.DB, btlPolicy pvtdatapolicy.BTLPolicy, bookkeepingProvider bookkeeping.Provider) (PurgeMgr, error)
type PvtdataKeys
    func (*PvtdataKeys) Descriptor() ([]byte, []int)
    func (m *PvtdataKeys) GetMap() map[string]*Collections
    func (*PvtdataKeys) ProtoMessage()
    func (m *PvtdataKeys) Reset()
    func (m *PvtdataKeys) String() string
    func (m *PvtdataKeys) XXX_DiscardUnknown()
    func (m *PvtdataKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
    func (dst *PvtdataKeys) XXX_Merge(src proto.Message)
    func (m *PvtdataKeys) XXX_Size() int
    func (m *PvtdataKeys) XXX_Unmarshal(b []byte) error

Package files

expiry_keeper.go expiry_schedule_builder.go purge_mgr.go pvtdata_key.pb.go pvtdata_key_helper.go

type Collections

type Collections struct {
    Map                  map[string]*KeysAndHashes `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
    XXX_unrecognized     []byte                    `json:"-"`
    XXX_sizecache        int32                     `json:"-"`
}

func (*Collections) Descriptor

func (*Collections) Descriptor() ([]byte, []int)

func (*Collections) GetMap

func (m *Collections) GetMap() map[string]*KeysAndHashes

func (*Collections) ProtoMessage

func (*Collections) ProtoMessage()

func (*Collections) Reset

func (m *Collections) Reset()

func (*Collections) String

func (m *Collections) String() string

func (*Collections) XXX_DiscardUnknown

func (m *Collections) XXX_DiscardUnknown()

func (*Collections) XXX_Marshal

func (m *Collections) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Collections) XXX_Merge

func (dst *Collections) XXX_Merge(src proto.Message)

func (*Collections) XXX_Size

func (m *Collections) XXX_Size() int

func (*Collections) XXX_Unmarshal

func (m *Collections) XXX_Unmarshal(b []byte) error

type KeyAndHash

type KeyAndHash struct {
    Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    Hash                 []byte   `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*KeyAndHash) Descriptor

func (*KeyAndHash) Descriptor() ([]byte, []int)

func (*KeyAndHash) GetHash

func (m *KeyAndHash) GetHash() []byte

func (*KeyAndHash) GetKey

func (m *KeyAndHash) GetKey() string

func (*KeyAndHash) ProtoMessage

func (*KeyAndHash) ProtoMessage()

func (*KeyAndHash) Reset

func (m *KeyAndHash) Reset()

func (*KeyAndHash) String

func (m *KeyAndHash) String() string

func (*KeyAndHash) XXX_DiscardUnknown

func (m *KeyAndHash) XXX_DiscardUnknown()

func (*KeyAndHash) XXX_Marshal

func (m *KeyAndHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyAndHash) XXX_Merge

func (dst *KeyAndHash) XXX_Merge(src proto.Message)

func (*KeyAndHash) XXX_Size

func (m *KeyAndHash) XXX_Size() int

func (*KeyAndHash) XXX_Unmarshal

func (m *KeyAndHash) XXX_Unmarshal(b []byte) error

type KeysAndHashes

type KeysAndHashes struct {
    List                 []*KeyAndHash `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
    XXX_NoUnkeyedLiteral struct{}      `json:"-"`
    XXX_unrecognized     []byte        `json:"-"`
    XXX_sizecache        int32         `json:"-"`
}

func (*KeysAndHashes) Descriptor

func (*KeysAndHashes) Descriptor() ([]byte, []int)

func (*KeysAndHashes) GetList

func (m *KeysAndHashes) GetList() []*KeyAndHash

func (*KeysAndHashes) ProtoMessage

func (*KeysAndHashes) ProtoMessage()

func (*KeysAndHashes) Reset

func (m *KeysAndHashes) Reset()

func (*KeysAndHashes) String

func (m *KeysAndHashes) String() string

func (*KeysAndHashes) XXX_DiscardUnknown

func (m *KeysAndHashes) XXX_DiscardUnknown()

func (*KeysAndHashes) XXX_Marshal

func (m *KeysAndHashes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeysAndHashes) XXX_Merge

func (dst *KeysAndHashes) XXX_Merge(src proto.Message)

func (*KeysAndHashes) XXX_Size

func (m *KeysAndHashes) XXX_Size() int

func (*KeysAndHashes) XXX_Unmarshal

func (m *KeysAndHashes) XXX_Unmarshal(b []byte) error

type PurgeMgr

PurgeMgr manages purging of the expired pvtdata

type PurgeMgr interface {
    // PrepareForExpiringKeys gives a chance to the PurgeMgr to do background work in advance if any
    PrepareForExpiringKeys(expiringAtBlk uint64)
    // WaitForPrepareToFinish holds the caller till the background goroutine launched by 'PrepareForExpiringKeys' is finished
    WaitForPrepareToFinish()
    // DeleteExpiredAndUpdateBookkeeping updates the bookkeeping and modifies the update batch by adding the deletes for the expired pvtdata
    DeleteExpiredAndUpdateBookkeeping(
        pvtUpdates *privacyenabledstate.PvtUpdateBatch,
        hashedUpdates *privacyenabledstate.HashedUpdateBatch) error
    // UpdateBookkeepingForPvtDataOfOldBlocks updates the existing expiry entries in the bookkeeper with the given pvtUpdates
    UpdateBookkeepingForPvtDataOfOldBlocks(pvtUpdates *privacyenabledstate.PvtUpdateBatch) error
    // BlockCommitDone is a callback to the PurgeMgr when the block is committed to the ledger
    BlockCommitDone() error
}

func InstantiatePurgeMgr

func InstantiatePurgeMgr(ledgerid string, db privacyenabledstate.DB, btlPolicy pvtdatapolicy.BTLPolicy, bookkeepingProvider bookkeeping.Provider) (PurgeMgr, error)

InstantiatePurgeMgr instantiates a PurgeMgr.

type PvtdataKeys

type PvtdataKeys struct {
    Map                  map[string]*Collections `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}                `json:"-"`
    XXX_unrecognized     []byte                  `json:"-"`
    XXX_sizecache        int32                   `json:"-"`
}

func (*PvtdataKeys) Descriptor

func (*PvtdataKeys) Descriptor() ([]byte, []int)

func (*PvtdataKeys) GetMap

func (m *PvtdataKeys) GetMap() map[string]*Collections

func (*PvtdataKeys) ProtoMessage

func (*PvtdataKeys) ProtoMessage()

func (*PvtdataKeys) Reset

func (m *PvtdataKeys) Reset()

func (*PvtdataKeys) String

func (m *PvtdataKeys) String() string

func (*PvtdataKeys) XXX_DiscardUnknown

func (m *PvtdataKeys) XXX_DiscardUnknown()

func (*PvtdataKeys) XXX_Marshal

func (m *PvtdataKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PvtdataKeys) XXX_Merge

func (dst *PvtdataKeys) XXX_Merge(src proto.Message)

func (*PvtdataKeys) XXX_Size

func (m *PvtdataKeys) XXX_Size() int

func (*PvtdataKeys) XXX_Unmarshal

func (m *PvtdataKeys) XXX_Unmarshal(b []byte) error