Documentation
¶
Index ¶
- Constants
- func Drivers() []string
- func Register(name string, driver driver.Driver)
- type ChaincodeEvent
- type Committer
- func (c *Committer) Commit(block *common.Block) error
- func (c *Committer) CommitEndorserTransaction(txID string, block *common.Block, indexInBlock int, env *common.Envelope, ...) (bool, error)
- func (c *Committer) DiscardEndorserTransaction(txID string, block *common.Block, event *TxEvent, ...) error
- func (c *Committer) GetChaincodeEvents(env *common.Envelope, block *common.Block) error
- func (c *Committer) HandleConfig(block *common.Block, i int, event *TxEvent, env *common.Envelope, ...) error
- func (c *Committer) HandleEndorserTransaction(block *common.Block, i int, event *TxEvent, env *common.Envelope, ...) error
- func (c *Committer) IsFinal(ctx context.Context, txID string) error
- func (c *Committer) Notify(event TxEvent)
- type ExternalCommitter
- func (c *ExternalCommitter) CommitTX(txid string, block uint64, indexInBloc int) error
- func (c *ExternalCommitter) DiscardTX(txid string) error
- func (c *ExternalCommitter) Status(txid string) (fdriver.ValidationCode, []string, []view.Identity, error)
- func (c *ExternalCommitter) Validate(txid string) (fdriver.ValidationCode, error)
- type Finality
- type Network
- type TransactionHandler
- type TxEvent
- type ValidationFlags
Constants ¶
View Source
const (
ConfigTXPrefix = "configtx_"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChaincodeEvent ¶
type ChaincodeEvent struct {
BlockNumber uint64
TransactionID string
ChaincodeID string
EventName string
Payload []byte
}
ChaincodeEvent models the chaincode event details.
func (*ChaincodeEvent) Message ¶
func (chaincodeEvent *ChaincodeEvent) Message() interface{}
func (*ChaincodeEvent) Topic ¶
func (chaincodeEvent *ChaincodeEvent) Topic() string
type Committer ¶ added in v0.2.0
type Committer struct {
Channel string
Network Network
Finality Finality
WaitForEventTimeout time.Duration
Tracer tracing.Tracer
Handlers map[common.HeaderType]TransactionHandler
QuietNotifier bool
// contains filtered or unexported fields
}
func (*Committer) Commit ¶ added in v0.2.0
Commit commits the transactions in the block passed as argument
func (*Committer) CommitEndorserTransaction ¶ added in v0.2.0
func (c *Committer) CommitEndorserTransaction(txID string, block *common.Block, indexInBlock int, env *common.Envelope, event *TxEvent) (bool, error)
CommitEndorserTransaction commits the transaction to the vault. It returns true, if the transaction was already processed, false otherwise.
func (*Committer) DiscardEndorserTransaction ¶ added in v0.2.0
func (c *Committer) DiscardEndorserTransaction(txID string, block *common.Block, event *TxEvent, validationCode pb.TxValidationCode) error
DiscardEndorserTransaction discards the transaction from the vault
func (*Committer) GetChaincodeEvents ¶ added in v0.3.0
GetChaincodeEvents reads the chaincode events and notifies the listeners registered to the specific chaincode.
func (*Committer) HandleConfig ¶ added in v0.3.0
func (*Committer) HandleEndorserTransaction ¶ added in v0.3.0
type ExternalCommitter ¶
type ExternalCommitter struct {
// contains filtered or unexported fields
}
func GetExternalCommitter ¶
func GetExternalCommitter(name string, sp view2.ServiceProvider, vault driver.Vault) (*ExternalCommitter, error)
func (*ExternalCommitter) CommitTX ¶
func (c *ExternalCommitter) CommitTX(txid string, block uint64, indexInBloc int) error
func (*ExternalCommitter) DiscardTX ¶
func (c *ExternalCommitter) DiscardTX(txid string) error
func (*ExternalCommitter) Status ¶
func (c *ExternalCommitter) Status(txid string) (fdriver.ValidationCode, []string, []view.Identity, error)
func (*ExternalCommitter) Validate ¶
func (c *ExternalCommitter) Validate(txid string) (fdriver.ValidationCode, error)
type TransactionHandler ¶ added in v0.3.0
type TxEvent ¶
type TxEvent struct {
Txid string
DependantTxIDs []string
Committed bool
Block uint64
IndexInBlock int
CommitPeer string
Err error
}
TxEvent contains information for token transaction commit
type ValidationFlags ¶
type ValidationFlags []uint8
Click to show internal directories.
Click to hide internal directories.