Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(customTxProcessors Processors)
Initialize sets the custom processors. This function is expected to be invoked only during ledgermgmt.Initialize() function.
Types ¶
type Processor ¶
type Processor interface {
GenerateSimulationResults(txEnvelop *common.Envelope, simulator ledger.TxSimulator) error
}
Processor allows to generate simulation results during commit time for custom transactions. A custom processor may represent the information in a propriety fashion and can use this process to translate the information into the form of `TxSimulationResults`. Because, the original information is signed in a custom representation, an implementation of a `Processor` should be cautious that the custom representation is used for simulation in an deterministic fashion and should take care of compatibility cross fabric versions.
func GetProcessor ¶
func GetProcessor(txType common.HeaderType) Processor
GetProcessor returns a Processor associated with the txType
type Processors ¶
type Processors map[common.HeaderType]Processor
Processors maintains the association between a custom transaction type to its corresponding tx processor