Documentation ¶
Index ¶
- type Parameter
- type Service
- func (s *Service) CurrentEpoch() phase0.Epoch
- func (s *Service) CurrentSlot() phase0.Slot
- func (s *Service) FirstSlotOfEpoch(epoch phase0.Epoch) phase0.Slot
- func (s *Service) GenesisTime() time.Time
- func (s *Service) SlotToEpoch(slot phase0.Slot) phase0.Epoch
- func (s *Service) StartOfEpoch(epoch phase0.Epoch) time.Time
- func (s *Service) StartOfSlot(slot phase0.Slot) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithGenesisProvider ¶ added in v1.8.0
func WithGenesisProvider(provider eth2client.GenesisProvider) Parameter
WithGenesisProvider sets the genesis provider.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithSpecProvider ¶ added in v1.8.0
func WithSpecProvider(provider eth2client.SpecProvider) Parameter
WithSpecProvider sets the spec provider.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides chain time services.
func (*Service) CurrentEpoch ¶
CurrentEpoch provides the current epoch.
func (*Service) CurrentSlot ¶
CurrentSlot provides the current slot.
func (*Service) FirstSlotOfEpoch ¶
FirstSlotOfEpoch provides the first slot of the given epoch.
func (*Service) GenesisTime ¶
GenesisTime provides the time of the chain's genesis.
func (*Service) SlotToEpoch ¶
SlotToEpoch provides the epoch of a given slot.
func (*Service) StartOfEpoch ¶
StartOfEpoch provides the time at which a given epoch starts.
Click to show internal directories.
Click to hide internal directories.