Documentation ¶
Index ¶
- type BlockAndPvtData
- type BlockPvtData
- type ChaincodeDefinition
- type ChaincodeLifecycleDetails
- type ChaincodeLifecycleEventListener
- type ChaincodeLifecycleEventProvider
- type ChaincodeLifecycleInfo
- type CollConfigNotDefinedError
- type CollectionConfigInfo
- type CommitOptions
- type Config
- type ConfigHistoryRetriever
- type CustomTxProcessor
- type DeployedChaincodeInfo
- type DeployedChaincodeInfoProvider
- type ErrCollectionConfigNotYetAvailable
- type HealthCheckRegistry
- type HistoryDBConfig
- type HistoryQueryExecutor
- type Initializer
- type InvalidCollNameError
- type InvalidTxError
- type KVStateUpdates
- type MembershipInfoProvider
- type MissingBlockPvtdataInfo
- type MissingCollectionPvtDataInfo
- type MissingPvtData
- type MissingPvtDataInfo
- type MissingPvtDataTracker
- type NotFoundInIndexErr
- type PeerLedger
- type PeerLedgerProvider
- type PrivateDataConfig
- type PvtCollFilter
- type PvtNsCollFilter
- type PvtdataHashMismatch
- type QueryExecutor
- type QueryResultsIterator
- type SimpleQueryExecutor
- type StateDBConfig
- type StateListener
- type StateUpdateTrigger
- type StateUpdates
- type TxMissingPvtDataMap
- type TxPvtData
- type TxPvtDataMap
- type TxSimulationResults
- type TxSimulator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockAndPvtData ¶
type BlockAndPvtData struct { Block *common.Block PvtData TxPvtDataMap MissingPvtData TxMissingPvtDataMap }
type BlockPvtData ¶
type BlockPvtData struct { BlockNum uint64 WriteSets TxPvtDataMap }
type ChaincodeDefinition ¶
type ChaincodeDefinition struct { Name string Hash []byte Version string CollectionConfigs *common.CollectionConfigPackage }
func (*ChaincodeDefinition) String ¶
func (cdef *ChaincodeDefinition) String() string
type ChaincodeLifecycleEventListener ¶
type ChaincodeLifecycleEventListener interface { HandleChaincodeDeploy(chaincodeDefinition *ChaincodeDefinition, dbArtifactsTar []byte) error ChaincodeDeployDone(succeeded bool) }
type ChaincodeLifecycleEventProvider ¶
type ChaincodeLifecycleEventProvider interface {
RegisterListener(channelID string, listener ChaincodeLifecycleEventListener)
}
type ChaincodeLifecycleInfo ¶
type ChaincodeLifecycleInfo struct { Name string Deleted bool Details *ChaincodeLifecycleDetails }
type CollConfigNotDefinedError ¶
type CollConfigNotDefinedError struct {
Ns string
}
func (*CollConfigNotDefinedError) Error ¶
func (e *CollConfigNotDefinedError) Error() string
type CollectionConfigInfo ¶
type CollectionConfigInfo struct { CollectionConfig *common.CollectionConfigPackage CommittingBlockNum uint64 }
type CommitOptions ¶
type CommitOptions struct {
FetchPvtDataFromLedger bool
}
type Config ¶
type Config struct { RootFSPath string StateDBConfig *StateDBConfig PrivateDataConfig *PrivateDataConfig HistoryDBConfig *HistoryDBConfig }
type ConfigHistoryRetriever ¶
type ConfigHistoryRetriever interface { CollectionConfigAt(blockNum uint64, chaincodeName string) (*CollectionConfigInfo, error) MostRecentCollectionConfigBelow(blockNum uint64, chaincodeName string) (*CollectionConfigInfo, error) }
type CustomTxProcessor ¶
type CustomTxProcessor interface {
GenerateSimulationResults(txEnvelop *common.Envelope, simulator TxSimulator, initializingLedger bool) error
}
type DeployedChaincodeInfo ¶
type DeployedChaincodeInfo struct { Name string Hash []byte Version string ExplicitCollectionConfigPkg *common.CollectionConfigPackage ImplicitCollections []*common.StaticCollectionConfig IsLegacy bool }
func (DeployedChaincodeInfo) AllCollectionsConfigPkg ¶
func (dci DeployedChaincodeInfo) AllCollectionsConfigPkg() *common.CollectionConfigPackage
type DeployedChaincodeInfoProvider ¶
type DeployedChaincodeInfoProvider interface { Namespaces() []string UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ChaincodeLifecycleInfo, error) ChaincodeInfo(channelName, chaincodeName string, qe SimpleQueryExecutor) (*DeployedChaincodeInfo, error) CollectionInfo(channelName, chaincodeName, collectionName string, qe SimpleQueryExecutor) (*common.StaticCollectionConfig, error) ImplicitCollections(channelName, chaincodeName string, qe SimpleQueryExecutor) ([]*common.StaticCollectionConfig, error) }
type ErrCollectionConfigNotYetAvailable ¶
func (*ErrCollectionConfigNotYetAvailable) Error ¶
func (e *ErrCollectionConfigNotYetAvailable) Error() string
type HealthCheckRegistry ¶
type HealthCheckRegistry interface {
RegisterChecker(string, healthz.HealthChecker) error
}
type HistoryDBConfig ¶
type HistoryDBConfig struct {
Enabled bool
}
type HistoryQueryExecutor ¶
type HistoryQueryExecutor interface {
GetHistoryForKey(namespace string, key string) (commonledger.ResultsIterator, error)
}
type Initializer ¶
type Initializer struct { StateListeners []StateListener DeployedChaincodeInfoProvider DeployedChaincodeInfoProvider MembershipInfoProvider MembershipInfoProvider ChaincodeLifecycleEventProvider ChaincodeLifecycleEventProvider MetricsProvider metrics.Provider HealthCheckRegistry HealthCheckRegistry Config *Config CustomTxProcessors map[common.HeaderType]CustomTxProcessor }
type InvalidCollNameError ¶
type InvalidCollNameError struct {
Ns, Coll string
}
func (*InvalidCollNameError) Error ¶
func (e *InvalidCollNameError) Error() string
type InvalidTxError ¶
type InvalidTxError struct {
Msg string
}
func (*InvalidTxError) Error ¶
func (e *InvalidTxError) Error() string
type KVStateUpdates ¶
type KVStateUpdates struct { PublicUpdates []*kvrwset.KVWrite CollHashUpdates map[string][]*kvrwset.KVWriteHash }
type MembershipInfoProvider ¶
type MembershipInfoProvider interface {
AmMemberOf(channelName string, collectionPolicyConfig *common.CollectionPolicyConfig) (bool, error)
}
type MissingBlockPvtdataInfo ¶
type MissingBlockPvtdataInfo map[uint64][]*MissingCollectionPvtDataInfo
type MissingCollectionPvtDataInfo ¶
type MissingCollectionPvtDataInfo struct {
Namespace, Collection string
}
type MissingPvtData ¶
type MissingPvtDataInfo ¶
type MissingPvtDataInfo map[uint64]MissingBlockPvtdataInfo
func (MissingPvtDataInfo) Add ¶
func (missingPvtDataInfo MissingPvtDataInfo) Add(blkNum, txNum uint64, ns, coll string)
type MissingPvtDataTracker ¶
type MissingPvtDataTracker interface {
GetMissingPvtDataInfoForMostRecentBlocks(maxBlocks int) (MissingPvtDataInfo, error)
}
type NotFoundInIndexErr ¶
type NotFoundInIndexErr string
func (NotFoundInIndexErr) Error ¶
func (NotFoundInIndexErr) Error() string
type PeerLedger ¶
type PeerLedger interface { commonledger.Ledger GetTransactionByID(txID string) (*peer.ProcessedTransaction, error) GetBlockByHash(blockHash []byte) (*common.Block, error) GetBlockByTxID(txID string) (*common.Block, error) GetTxValidationCodeByTxID(txID string) (peer.TxValidationCode, error) NewTxSimulator(txid string) (TxSimulator, error) NewQueryExecutor() (QueryExecutor, error) NewHistoryQueryExecutor() (HistoryQueryExecutor, error) GetPvtDataAndBlockByNum(blockNum uint64, filter PvtNsCollFilter) (*BlockAndPvtData, error) GetPvtDataByNum(blockNum uint64, filter PvtNsCollFilter) ([]*TxPvtData, error) CommitLegacy(blockAndPvtdata *BlockAndPvtData, commitOpts *CommitOptions) error GetConfigHistoryRetriever() (ConfigHistoryRetriever, error) CommitPvtDataOfOldBlocks(blockPvtData []*BlockPvtData) ([]*PvtdataHashMismatch, error) GetMissingPvtDataTracker() (MissingPvtDataTracker, error) DoesPvtDataInfoExist(blockNum uint64) (bool, error) }
type PeerLedgerProvider ¶
type PrivateDataConfig ¶
type PvtCollFilter ¶
type PvtNsCollFilter ¶
type PvtNsCollFilter map[string]PvtCollFilter
func NewPvtNsCollFilter ¶
func NewPvtNsCollFilter() PvtNsCollFilter
func (PvtNsCollFilter) Add ¶
func (filter PvtNsCollFilter) Add(ns string, coll string)
type PvtdataHashMismatch ¶
type QueryExecutor ¶
type QueryExecutor interface { SimpleQueryExecutor GetStateMetadata(namespace, key string) (map[string][]byte, error) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error) GetStateRangeScanIteratorWithMetadata(namespace string, startKey, endKey string, metadata map[string]interface{}) (QueryResultsIterator, error) ExecuteQuery(namespace, query string) (commonledger.ResultsIterator, error) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (QueryResultsIterator, error) GetPrivateData(namespace, collection, key string) ([]byte, error) GetPrivateDataMetadata(namespace, collection, key string) (map[string][]byte, error) GetPrivateDataMetadataByHash(namespace, collection string, keyhash []byte) (map[string][]byte, error) GetPrivateDataMultipleKeys(namespace, collection string, keys []string) ([][]byte, error) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error) ExecuteQueryOnPrivateData(namespace, collection, query string) (commonledger.ResultsIterator, error) Done() }
type QueryResultsIterator ¶
type QueryResultsIterator interface { commonledger.ResultsIterator GetBookmarkAndClose() string }
type SimpleQueryExecutor ¶
type StateDBConfig ¶
type StateListener ¶
type StateListener interface { Initialize(ledgerID string, qe SimpleQueryExecutor) error InterestedInNamespaces() []string HandleStateUpdates(trigger *StateUpdateTrigger) error StateCommitDone(channelID string) }
type StateUpdateTrigger ¶
type StateUpdateTrigger struct { LedgerID string StateUpdates StateUpdates CommittingBlockNum uint64 CommittedStateQueryExecutor SimpleQueryExecutor PostCommitQueryExecutor SimpleQueryExecutor }
type StateUpdates ¶
type StateUpdates map[string]*KVStateUpdates
type TxMissingPvtDataMap ¶
type TxMissingPvtDataMap map[uint64][]*MissingPvtData
type TxPvtData ¶
type TxPvtData struct { SeqInBlock uint64 WriteSet *rwset.TxPvtReadWriteSet }
type TxPvtDataMap ¶
type TxSimulationResults ¶
type TxSimulationResults struct { PubSimulationResults *rwset.TxReadWriteSet PvtSimulationResults *rwset.TxPvtReadWriteSet }
func (*TxSimulationResults) ContainsPvtWrites ¶
func (txSim *TxSimulationResults) ContainsPvtWrites() bool
func (*TxSimulationResults) GetPubSimulationBytes ¶
func (txSim *TxSimulationResults) GetPubSimulationBytes() ([]byte, error)
func (*TxSimulationResults) GetPvtSimulationBytes ¶
func (txSim *TxSimulationResults) GetPvtSimulationBytes() ([]byte, error)
type TxSimulator ¶
type TxSimulator interface { QueryExecutor SetState(namespace string, key string, value []byte) error DeleteState(namespace string, key string) error SetStateMultipleKeys(namespace string, kvs map[string][]byte) error SetStateMetadata(namespace, key string, metadata map[string][]byte) error DeleteStateMetadata(namespace, key string) error ExecuteUpdate(query string) error SetPrivateData(namespace, collection, key string, value []byte) error SetPrivateDataMultipleKeys(namespace, collection string, kvs map[string][]byte) error DeletePrivateData(namespace, collection, key string) error SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error DeletePrivateDataMetadata(namespace, collection, key string) error GetTxSimulationResults() (*TxSimulationResults, error) }
Click to show internal directories.
Click to hide internal directories.