pvtstatepurgemgmt

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collections

type Collections struct {
	Map                  map[string]*KeysAndHashes `` /* 147-byte string literal not displayed */
	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

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 lauched 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
}

PurgeMgr manages purging of the expired pvtdata

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 `` /* 147-byte string literal not displayed */
	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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL