standard

package
v1.6.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 WithChainTime

func WithChainTime(chainTime chaintime.Service) Parameter

WithChainTime sets the chain time for the service.

func WithConsensusClient

func WithConsensusClient(client eth2client.Service) Parameter

WithConsensusClient sets the consensus client for the service.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the service.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor.

func WithScheduler

func WithScheduler(service scheduler.Service) Parameter

WithScheduler sets the scheduler for the service..

type Service

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

Service provides cached information.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new cache.

func (*Service) BlockRootToSlot

func (s *Service) BlockRootToSlot(ctx context.Context, root phase0.Root) (phase0.Slot, error)

BlockRootToSlot provides the slot for a given block root.

func (*Service) ExecutionChainHead added in v1.6.0

func (s *Service) ExecutionChainHead(_ context.Context) (phase0.Hash32, uint64)

ExecutionChainHead provides the execution chain head.

Jump to

Keyboard shortcuts

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