shared

package
v4.2.2-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: GPL-3.0 Imports: 15 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexFromQuery added in v4.2.0

func HexFromQuery(w http.ResponseWriter, r *http.Request, name string, length int, required bool) (string, []byte, bool)

func HexFromRoute added in v4.2.0

func HexFromRoute(w http.ResponseWriter, r *http.Request, name string, length int) (string, []byte, bool)

func IsOptimistic added in v4.1.0

func IsOptimistic(
	ctx context.Context,
	w http.ResponseWriter,
	optimisticModeFetcher blockchain.OptimisticModeFetcher,
) (bool, error)

IsOptimistic checks whether the beacon node is currently optimistic and writes it to the response.

func IsSyncing added in v4.1.0

func IsSyncing(
	ctx context.Context,
	w http.ResponseWriter,
	syncChecker sync.Checker,
	headFetcher blockchain.HeadFetcher,
	timeFetcher blockchain.TimeFetcher,
	optimisticModeFetcher blockchain.OptimisticModeFetcher,
) bool

IsSyncing checks whether the beacon node is currently syncing and writes out the sync status.

func UintFromQuery added in v4.1.0

func UintFromQuery(w http.ResponseWriter, r *http.Request, name string, required bool) (string, uint64, bool)

func UintFromRoute added in v4.2.0

func UintFromRoute(w http.ResponseWriter, r *http.Request, name string) (string, uint64, bool)

func ValidateHex

func ValidateHex(w http.ResponseWriter, name, s string, length int) ([]byte, bool)

func ValidateUint

func ValidateUint(w http.ResponseWriter, name, s string) (uint64, bool)

func WriteBlockFetchError added in v4.1.0

func WriteBlockFetchError(w http.ResponseWriter, blk interfaces.ReadOnlySignedBeaconBlock, err error) bool

WriteBlockFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching block.

func WriteStateFetchError added in v4.1.0

func WriteStateFetchError(w http.ResponseWriter, err error)

WriteStateFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching state.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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