Documentation ¶
Index ¶
- func EventKey(eventName, contractName, chainRid string) []byte
- func InitEventManager()
- type EventInfo
- type EventManager
- func (e *EventManager) BuildCrossChainMsg(eventInfo *EventInfo) (req *relay_chain.BeginCrossChainRequest, err error)
- func (e *EventManager) DeleteEvent(event *common.CrossChainEvent) error
- func (e *EventManager) GetEvent(crossChainEventId string) ([]*common.CrossChainEvent, error)
- func (e *EventManager) SaveEvent(event *common.CrossChainEvent, isNew bool) error
- func (e *EventManager) SetEventState(crossChainEventId string, state bool, stateMessages string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventKey ¶
EventKey 生成eventKey
@param eventName @param contractName @param chainRid @return []byte
Types ¶
type EventInfo ¶
type EventInfo struct { Topic string ChainRid string ContractName string TxProve string Data []string Tx []byte TxId string BlockHeight int64 }
EventInfo 产生事件的结构
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
EventManager 跨链触发器结构体
var EventManagerV1 *EventManager
EventManagerV1 跨链触发器
func (*EventManager) BuildCrossChainMsg ¶
func (e *EventManager) BuildCrossChainMsg(eventInfo *EventInfo) (req *relay_chain.BeginCrossChainRequest, err error)
BuildCrossChainMsg 创建跨链信息
@receiver e @param eventInfo @return req @return err
func (*EventManager) DeleteEvent ¶
func (e *EventManager) DeleteEvent(event *common.CrossChainEvent) error
DeleteEvent 删除event
@receiver e @param event @return error
func (*EventManager) GetEvent ¶
func (e *EventManager) GetEvent(crossChainEventId string) ([]*common.CrossChainEvent, error)
GetEvent 获取跨链事件
@receiver e @param crossChainEventId @return []*common.CrossChainEvent @return error
func (*EventManager) SaveEvent ¶
func (e *EventManager) SaveEvent(event *common.CrossChainEvent, isNew bool) error
SaveEvent 保存event
@receiver e @param event @param isNew @return error
Click to show internal directories.
Click to hide internal directories.