Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppchainMonitor ¶
type AppchainMonitor struct {
// contains filtered or unexported fields
}
Monitor receives event from blockchain and sends it to network
func New ¶
func New(client plugins.Client, cryptor txcrypto.Cryptor, logger logrus.FieldLogger) (*AppchainMonitor, error)
New creates monitor instance given client interacting with appchain and interchainCounter about appchain.
func (*AppchainMonitor) ListenIBTP ¶ added in v1.5.0
func (m *AppchainMonitor) ListenIBTP() <-chan *pb.IBTP
func (*AppchainMonitor) QueryIBTP ¶
func (m *AppchainMonitor) QueryIBTP(id string) (*pb.IBTP, error)
QueryIBTP queries interchain tx recorded in appchain given ibtp id
func (*AppchainMonitor) QueryOuterMeta ¶ added in v1.5.0
func (m *AppchainMonitor) QueryOuterMeta() map[string]uint64
QueryOuterMeta queries outer meta from appchain. It will loop until the result is returned or panic.
type Monitor ¶
type Monitor interface { // Start starts the service of monitor Start() error // Stop stops the service of monitor Stop() error // listen on interchain ibtp from appchain ListenIBTP() <-chan *pb.IBTP // query historical ibtp by its id QueryIBTP(id string) (*pb.IBTP, error) // QueryLatestMeta queries latest index map of ibtps threw on appchain QueryOuterMeta() map[string]uint64 }
Directories
¶
Path | Synopsis |
---|---|
Package mock_monitor is a generated GoMock package.
|
Package mock_monitor is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.