mock

package
v0.6.22 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 8 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 WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithTimeout

func WithTimeout(timeout time.Duration) Parameter

WithTimeout sets the maximum duration for all requests to the endpoint.

type Service

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

Service is a mock Ethereum 2 client service, providing data locally.

func New

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

New creates a new Ethereum 2 client service, mocking connections

func (*Service) BeaconBlockProposal

func (s *Service) BeaconBlockProposal(ctx context.Context, slot spec.Slot, randaoReveal spec.BLSSignature, graffiti []byte) (*spec.BeaconBlock, error)

BeaconBlockProposal fetches a proposed beacon block for signing.

func (*Service) Genesis

func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error)

Genesis provides the genesis information of the chain.

func (*Service) Name

func (s *Service) Name() string

Name provides the name of the service.

Jump to

Keyboard shortcuts

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