slotticker

package
v1.2.2-unstable Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfgProvider ConfigProvider) *slotTicker

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

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func (Config) GetGenesisTime

func (cfg Config) GetGenesisTime() time.Time

func (Config) SlotDurationSec

func (cfg Config) SlotDurationSec() time.Duration

type ConfigProvider

type ConfigProvider interface {
	SlotDurationSec() time.Duration
	GetGenesisTime() time.Time
}

type Provider

type Provider func() SlotTicker

type SlotTicker

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

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