ethstats

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-3.0 Imports: 38 Imported by: 0

Documentation

Overview

Package ethstats implements the network stats reporting service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(node *node.Node, backend backend, engine consensus.Engine, url string) error

New returns a monitoring service ready for stats reporting.

Types

type DelegateSignMessage

type DelegateSignMessage struct {
	PeerID  enode.ID
	Payload StatsPayload
}

DelegateSignMessage Payload to be signed with the peer that sent it

type Service

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

Service implements an Ethereum netstats reporting daemon that pushes local chain statistics up to a monitoring server.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols implements node.Service, returning the P2P network protocols used by the stats service (nil as it doesn't use the devp2p overlay network).

func (*Service) Start

func (s *Service) Start() error

Start implements node.Service, starting up the monitoring and reporting daemon.

func (*Service) Stop

func (s *Service) Stop() error

Stop implements node.Lifecycle, terminating the monitoring and reporting daemon.

type StatsPayload

type StatsPayload struct {
	Action string      `json:"action"`
	Stats  interface{} `json:"stats"`
}

StatsPayload todo: document this

Jump to

Keyboard shortcuts

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