cli

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggingCategory = "LOGGING AND DEBUGGING"
	GenesisCategory = "GENESIS"
	RelayCategory   = "RELAYS"
	GeneralCategory = "GENERAL"
	Metrics         = "METRICS"
)

Variables

This section is empty.

Functions

func Main

func Main()

func MergeRelayConfigs added in v1.11.0

func MergeRelayConfigs(relays []types.RelayEntry, configMap map[string]types.RelayConfig) ([]types.RelayConfig, error)

MergeRelayConfigs merges relays passed via --relay with relays from config file. Returns an error if the same relay appears in both places. Users should specify each relay in exactly one place either cli or config file.

Types

type Config added in v1.11.0

type Config struct {
	TimeoutGetHeaderMs uint64            `yaml:"timeout_get_header_ms"`
	LateInSlotTimeMs   uint64            `yaml:"late_in_slot_time_ms"`
	Relays             []RelayConfigYAML `yaml:"relays"`
}

Config holds all configuration settings from the config file

type ConfigResult added in v1.11.0

type ConfigResult struct {
	RelayConfigs       map[string]types.RelayConfig
	TimeoutGetHeaderMs uint64
	LateInSlotTimeMs   uint64
}

func LoadConfigFile added in v1.11.0

func LoadConfigFile(configPath string) (*ConfigResult, error)

LoadConfigFile loads configurations from a YAML file

type ConfigWatcher added in v1.11.0

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

ConfigWatcher provides hot reloading of config files

func NewConfigWatcher added in v1.11.0

func NewConfigWatcher(configPath string, cliRelays []types.RelayEntry, log *logrus.Entry) (*ConfigWatcher, error)

NewConfigWatcher creates a new config file watcher

func (*ConfigWatcher) Watch added in v1.11.0

func (cw *ConfigWatcher) Watch(onConfigChange func(*ConfigResult))

Watch starts watching the config file for changes

type RelayConfigYAML added in v1.11.0

type RelayConfigYAML struct {
	URL                  string `yaml:"url"`
	EnableTimingGames    bool   `yaml:"enable_timing_games"`
	TargetFirstRequestMs uint64 `yaml:"target_first_request_ms"`
	FrequencyGetHeaderMs uint64 `yaml:"frequency_get_header_ms"`
}

type RelaySetupResult added in v1.11.0

type RelaySetupResult struct {
	RelayConfigs       []serverTypes.RelayConfig
	MinBid             types.U256Str
	RelayCheck         bool
	TimeoutGetHeaderMs uint64
	LateInSlotTimeMs   uint64
	CLIRelays          []serverTypes.RelayEntry // CLI-provided relays for hot-reload merging
}

Jump to

Keyboard shortcuts

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