Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Waiter ¶
type Waiter interface { // WaitForHash takes a hash and a duration, and returns a WaitResult of // Success, Timeout, or NotFound. Callers should confirm that the block is not known to // their application before calling, but the waiter keeps a brief history of known blocks // to avoid race conditions. Calling applications should call cu.Done() on chain updates // for the waiter to process blocks. Note that blocks that get reorged out may never be // processed even though their hashes have been seen. WaitForHashResult(types.Hash, time.Duration) WaitResult // WaitForHash behaves like WaitForHashResult without returning a result. Callers should confirm that the // block is not known to their application, call WaitForHash, then check their application again. WaitForHash(types.Hash, time.Duration) // WaitForNumber takes a block number and a duration, and returns a WaitResult of // Success, Timeout, or NotFound. Callers should confirm that the block is not known to // their application before calling, but the waiter keeps a brief history of known blocks // to avoid race conditions. Calling applications should call pb.Done() on pending batches // for the waiter to process blocks. Note that depending on how blocks get processed by the // OrderedMessageProcessor, blocks that get reorged out may never be processed. WaitForNumberResult(int64, time.Duration) WaitResult // WaitForNumber behaves like WaitForNumberResult without returning a result. Callers should confirm that the // block is not known to their application, call WaitForHash, then check their application again. WaitForNumber(int64, time.Duration) Stop() }
func NewOmpWaiter ¶
func NewOmpWaiter(omp *delivery.OrderedMessageProcessor) Waiter
Click to show internal directories.
Click to hide internal directories.