Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIBTPNotFound = fmt.Errorf("receipt from bitxhub failed") ErrMetaOutOfDate = fmt.Errorf("interchain meta is out of date") )
Functions ¶
This section is empty.
Types ¶
type AppchainHandler ¶ added in v1.4.0
type AppchainHandler func() error
type IBTPHandler ¶
type RecoverUnionHandler ¶ added in v1.4.0
type RecoverUnionHandler func(ibtp *pb.IBTP) (*rpcx.Interchain, error)
type RollbackHandler ¶ added in v1.6.1
type Syncer ¶
type Syncer interface {
// Start starts the service of syncer
Start() error
// Stop stops the service of syncer
Stop() error
// QueryInterchainMeta queries meta including interchain and receipt related meta from bitxhub
QueryInterchainMeta(serviceID string) *pb.Interchain
// QueryIBTP query ibtp from bitxhub by its id.
// if error occurs, it means this ibtp is not existed on bitxhub
QueryIBTP(ibtpID string, isReq bool) (*pb.IBTP, bool, error)
// ListenIBTP listen on the ibtps destined for this pier from bitxhub
ListenIBTP() <-chan *model.WrappedIBTP
// SendIBTP sends interchain or receipt type of ibtp to bitxhub
// if error occurs, user need to reconstruct this ibtp cause it means ibtp is invalid on bitxhub
SendIBTP(ibtp *pb.IBTP) error
SendIBTPWithRetry(ibtp *pb.IBTP)
GetAssetExchangeSigns(id string) ([]byte, error)
//getIBTPSigns gets ibtp signs from bitxhub cluster
GetIBTPSigns(ibtp *pb.IBTP) ([]byte, error)
//GetAppchains gets appchains from bitxhub node
GetBitXHubIDs() ([]string, error)
//GetInterchainById gets interchain meta by service id
GetServiceIDs() ([]string, error)
GetChainID() (uint64, error)
RegisterRollbackHandler(handler RollbackHandler) error
GetTxStatus(id string) (pb.TransactionStatus, error)
}
Click to show internal directories.
Click to hide internal directories.