agent

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBeaconStateFileName

func CreateBeaconStateFileName(
	node string,
	network string,
	slot phase0.Slot,
	stateRoot string,
) string

func CreateExecutionBadBlockFileName

func CreateExecutionBadBlockFileName(
	node string,
	network string,
	blockHash string,
) string

func CreateExecutionBlockTraceFileName

func CreateExecutionBlockTraceFileName(
	node string,
	network string,
	blockNumber uint64,
	blockHash string,
) string

func New

func New(ctx context.Context, log logrus.FieldLogger, config *Config) (*agent, error)

Types

type BadBlockRequest

type BadBlockRequest struct {
}

type BeaconStateRequest

type BeaconStateRequest struct {
	Slot phase0.Slot
}

type Config

type Config struct {
	LoggingLevel string  `yaml:"logging" default:"info"`
	MetricsAddr  string  `yaml:"metricsAddr" default:":9090"`
	PProfAddr    *string `yaml:"pprofAddr"`

	// The name of the agent
	Name string `yaml:"name"`

	// Ethereum configuration
	Ethereum ethereum.Config `yaml:"ethereum"`

	// Indexer configuration
	Indexer *indexer.Config `yaml:"indexer"`

	// Store configuration
	Store *store.Config `yaml:"store"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ExecutionBlockTraceRequest

type ExecutionBlockTraceRequest struct {
	BlockNumber uint64
	BlockHash   string
}

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) IncrementItemExported added in v0.0.11

func (m *Metrics) IncrementItemExported(queue Queue)

func (*Metrics) ObserveQueueItemProcessingTime

func (m *Metrics) ObserveQueueItemProcessingTime(queue Queue, duration time.Duration)

func (*Metrics) SetQueueSize

func (m *Metrics) SetQueueSize(queue Queue, count int)

type Queue

type Queue string
var (
	BeaconStateQueue         Queue = "beacon_state"
	ExecutionBlockTraceQueue Queue = "execution_block_trace"
	ExecutionBadBlockQueue   Queue = "execution_bad_block"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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