openeth

package
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Superviser

type Superviser struct {
	*nodemanager.Superviser
	// contains filtered or unexported fields
}

func NewSuperviser

func NewSuperviser(
	binary string,
	dataDir string,
	ipcFilePath string,
	arguments []string,
	isReader bool,
	debugDeepMind bool,
	headBlockUpdateFunc nodeManager.HeadBlockUpdater,
	enforcePeersStr string,
	logToZap bool,
	appLogger *zap.Logger,
	nodelogger *zap.Logger,
) (*Superviser, error)

func (*Superviser) AddPeer

func (s *Superviser) AddPeer(peer string) error

AddPeer sends a command through IPC socket to connect geth to the given peer

func (*Superviser) EnsurePeersByDNS

func (s *Superviser) EnsurePeersByDNS(wantedPeersHostnames []string)

EnsurePeersByDNS periodically checks IP addresses on the given FQDNs, calls /v1/server_id on port 8080 and adds them as peers wantedPeersHostnames can point to the headless service name in k8s

func (*Superviser) GetCommand

func (s *Superviser) GetCommand() string

func (*Superviser) GetName

func (s *Superviser) GetName() string

func (*Superviser) HasData

func (s *Superviser) HasData() bool

func (*Superviser) LastSeenBlockNum

func (s *Superviser) LastSeenBlockNum() uint64

func (*Superviser) MarshalLogObject

func (s *Superviser) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*Superviser) Monitor

func (s *Superviser) Monitor()

Monitor periodically checks the head block num and block time, as well as the enode string (server ID)

func (*Superviser) ServerID

func (s *Superviser) ServerID() (string, error)

func (*Superviser) UpdateLastBlockSeen added in v1.4.12

func (s *Superviser) UpdateLastBlockSeen(blockNum uint64)

Jump to

Keyboard shortcuts

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