slotticker

package
v1.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger *zap.Logger, cfg Config) *slotTicker

New returns a goroutine-free SlotTicker implementation which is not thread-safe.

Types

type Config

type Config struct {
	SlotDuration time.Duration
	GenesisTime  time.Time
}

type Provider

type Provider func() SlotTicker

type SlotTicker

type SlotTicker interface {
	Next() <-chan time.Time
	Slot() phase0.Slot
}

type Timer added in v1.3.0

type Timer interface {
	Stop() bool
	Reset(d time.Duration) bool
	C() <-chan time.Time
}

func NewTimer added in v1.3.0

func NewTimer(d time.Duration) Timer

type TimerProvider added in v1.3.0

type TimerProvider func(d time.Duration) Timer

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL