Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogTag = log.Service("block-tracker")
Functions ¶
This section is empty.
Types ¶
type BlockTracker ¶
type BlockTracker struct {
// contains filtered or unexported fields
}
func NewBlockTracker ¶
func NewBlockTracker(parent log.Logger, startingHeight uint64, graceDist uint16) *BlockTracker
func (*BlockTracker) IncrementTo ¶ added in v0.7.11
func (t *BlockTracker) IncrementTo(height primitives.BlockHeight)
func (*BlockTracker) WaitForBlock ¶
func (t *BlockTracker) WaitForBlock(ctx context.Context, requestedHeight primitives.BlockHeight) error
waits until we reach a block at the specified height, or until the context is closed to wait until some timeout, pass a child context with a deadline
type NopHeightReporter ¶ added in v0.7.1
type NopHeightReporter struct{}
shim for BlockWriter
func (NopHeightReporter) IncrementTo ¶ added in v0.7.11
func (_ NopHeightReporter) IncrementTo(height primitives.BlockHeight)
type PeriodicalTrigger ¶ added in v1.2.1
type PeriodicalTrigger struct { govnr.TreeSupervisor Closed govnr.ContextEndedChan // contains filtered or unexported fields }
the trigger is coupled with supervized package, this feels okay for now
func NewPeriodicalTrigger ¶
func (*PeriodicalTrigger) Stop ¶ added in v1.2.1
func (t *PeriodicalTrigger) Stop()
type Ticker ¶ added in v1.3.0
type Ticker interface { // The channel on which the ticks are delivered. C() <-chan time.Time // Stop turns off a ticker. After Stop, no more ticks will be sent. // Stop does not close the channel, to prevent a concurrent goroutine // reading from the channel from seeing an erroneous "tick". Stop() }
proxy interface for time.Ticker
func NewTimeTicker ¶ added in v1.3.0
type Timer ¶
This struct comes to work around the timer channel issue: https://github.com/golang/go/issues/11513 Google couldn't break the API or behavior, so they documented it https://github.com/golang/go/issues/14383 we just wrap the timer so we can reset and stop as expected without the workaround of the channel issue.
Click to show internal directories.
Click to hide internal directories.