nodeapi

package
v0.0.0-...-5f8afbd Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Health

func Health(ctx context.Context, cli eth2api.Client) (syncing bool, err error)

Checks node health. Healthy = no error. May be syncing, capable of serving incomplete data.

Err will be non-nil when syncing.

func Identity

func Identity(ctx context.Context, cli eth2api.Client, dest *eth2api.NetworkIdentity) error

Retrieves data about the node's network presence.

func NodeVersion

func NodeVersion(ctx context.Context, cli eth2api.Client, dest *eth2api.NodeVersionResponse) error

Requests that the beacon node identify information about its implementation in a format similar to a [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) field.

func Peer

func Peer(ctx context.Context, cli eth2api.Client, peerId eth2api.ApiPeerId, dest *eth2api.Peer) (exists bool, err error)

Retrieves data about the given peer

func PeerCount

func PeerCount(ctx context.Context, cli eth2api.Client, dest *eth2api.PeerCountResponse) error

Retrieves number of known peers.

func Peers

func Peers(ctx context.Context, cli eth2api.Client, state []eth2api.ConnectionState, direction []eth2api.ConnectionDirection, dest *[]eth2api.Peer) error

Retrieves data about the node's network peers. By default this returns all peers. Different query params are combined using AND conditions. Array items with OR conditions.

func SyncingStatus

func SyncingStatus(ctx context.Context, cli eth2api.Client, dest *eth2api.SyncingStatus) error

Requests the beacon node to describe if it's currently syncing or not, and if it is, what block it is up to.

Types

This section is empty.

Jump to

Keyboard shortcuts

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