customtx

package
v1.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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