eth2wrap

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

Package eth2wrap provides a wrapper for eth2http.Service adding prometheus metrics and error wrapping.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPAdapterForT added in v0.12.0

func NewHTTPAdapterForT(_ *testing.T, address string, timeout time.Duration) *httpAdapter

NewHTTPAdapterForT returns a http adapter for testing non-eth2service methods as it is nil.

Types

type BlockAttestationsProvider added in v0.12.0

type BlockAttestationsProvider interface {
	BlockAttestations(ctx context.Context, stateID string) ([]*eth2p0.Attestation, error)
}

BlockAttestationsProvider is the interface for providing attestations included in blocks. It is a standard beacon API endpoint not implemented by eth2client. See https://ethereum.github.io/beacon-APIs/#/Beacon/getBlockAttestations.

type Client added in v0.10.0

Client defines all go-eth2-client interfaces used in charon.

func AdaptEth2HTTP added in v0.10.1

func AdaptEth2HTTP(eth2Svc *eth2http.Service, timeout time.Duration) Client

AdaptEth2HTTP returns a Client wrapping an eth2http service by adding experimental endpoints. Note that the returned client doesn't wrap errors, so they are unstructured without stacktraces.

func Instrument added in v0.10.1

func Instrument(clients ...Client) (Client, error)

Instrument returns a new multi instrumented client using the provided clients as backends.

func NewMultiHTTP added in v0.10.0

func NewMultiHTTP(ctx context.Context, timeout time.Duration, addresses ...string) (Client, error)

NewMultiHTTP returns a new instrumented multi eth2 http client.

func WithSyntheticDuties added in v0.13.0

func WithSyntheticDuties(cl Client, pubkeys []eth2p0.BLSPubKey) Client

WithSyntheticDuties wraps the provided client adding synthetic duties.

Directories

Path Synopsis
Command genwrap provides a code generator for eth2client provider methods implemented by eth2multi.Service.
Command genwrap provides a code generator for eth2client provider methods implemented by eth2multi.Service.

Jump to

Keyboard shortcuts

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