ethereum

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Execution configuration
	Execution []*execution.Config `yaml:"execution"`
	// Override network name for custom networks (bypasses networkMap)
	OverrideNetworkName *string `yaml:"overrideNetworkName"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Metrics

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

func GetMetricsInstance

func GetMetricsInstance(namespace string) *Metrics

func (*Metrics) SetNodesTotal

func (m *Metrics) SetNodesTotal(count float64, labels []string)

type Network

type Network struct {
	ID   int32
	Name string
}

func GetNetworkByChainID

func GetNetworkByChainID(chainID int32) (*Network, error)

GetNetworkByChainID returns the network information for the given chain ID

type Pool

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

func NewPool

func NewPool(log logrus.FieldLogger, namespace string, config *Config) *Pool

func (*Pool) GetHealthyExecutionNode

func (p *Pool) GetHealthyExecutionNode() *execution.Node

func (*Pool) GetHealthyExecutionNodes

func (p *Pool) GetHealthyExecutionNodes() []*execution.Node

func (*Pool) GetNetworkByChainID

func (p *Pool) GetNetworkByChainID(chainID int32) (*Network, error)

GetNetworkByChainID returns the network information for the given chain ID If overrideNetworkName is set in config, it returns that name instead of using networkMap

func (*Pool) HasExecutionNodes

func (p *Pool) HasExecutionNodes() bool

func (*Pool) HasHealthyExecutionNodes

func (p *Pool) HasHealthyExecutionNodes() bool

func (*Pool) Start

func (p *Pool) Start(ctx context.Context)

func (*Pool) Stop

func (p *Pool) Stop(ctx context.Context) error

Stop gracefully shuts down the pool

func (*Pool) UpdateNodeMetrics

func (p *Pool) UpdateNodeMetrics()

func (*Pool) WaitForHealthyExecutionNode

func (p *Pool) WaitForHealthyExecutionNode(ctx context.Context) (*execution.Node, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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