Documentation
¶
Index ¶
- type ChannelExecutor
- func (e *ChannelExecutor) HandleIBTP(ibtp *pb.IBTP) *pb.IBTP
- func (e *ChannelExecutor) QueryLatestMeta() map[string]uint64
- func (e *ChannelExecutor) QueryReceipt(from string, idx uint64, originalIBTP *pb.IBTP) (*pb.IBTP, error)
- func (e *ChannelExecutor) Start() error
- func (e *ChannelExecutor) Stop() error
- type Executor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelExecutor ¶
type ChannelExecutor struct {
// contains filtered or unexported fields
}
ChannelExecutor represents the necessary data for executing interchain txs in appchain
func New ¶
func New(client client.Client, pierID string, storage storage.Storage, cryptor txcrypto.Cryptor) (*ChannelExecutor, error)
New creates new instance of Executor. agent is for interacting with counterpart chain client is for interacting with appchain, meta is for recording interchain tx meta information and ds is for persisting some runtime messages
func (*ChannelExecutor) HandleIBTP ¶
func (e *ChannelExecutor) HandleIBTP(ibtp *pb.IBTP) *pb.IBTP
applyIBTP handle ibtps of any type
func (*ChannelExecutor) QueryLatestMeta ¶
func (e *ChannelExecutor) QueryLatestMeta() map[string]uint64
func (*ChannelExecutor) QueryReceipt ¶
func (e *ChannelExecutor) QueryReceipt(from string, idx uint64, originalIBTP *pb.IBTP) (*pb.IBTP, error)
getReceipt only generates one receipt given source chain id and interchain tx index
type Executor ¶
type Executor interface { // Start starts the service of executor Start() error // Stop stops the service of executor Stop() error // HandleIBTP handles interchain ibtps from other appchains // and return the receipt ibtp for ack or callback HandleIBTP(ibtp *pb.IBTP) *pb.IBTP // QueryLatestMeta queries latest index map of ibtps executed on appchain QueryLatestMeta() map[string]uint64 // QueryReceipt query receipt for original interchain ibtp QueryReceipt(from string, idx uint64, originalIBTP *pb.IBTP) (*pb.IBTP, error) }
Directories
¶
Path | Synopsis |
---|---|
Package mock_executor is a generated GoMock package.
|
Package mock_executor is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.