config

package
v1.25.5 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: GPL-3.0, LGPL-3.0, LGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigFilePathKey = "config-file"
	LogLevelKey       = "log-level"
	EndpointsKey      = "endpoints"
	MaxFeeCapKey      = "max-fee-cap"
	MaxTipCapKey      = "max-tip-cap"
	WorkersKey        = "workers"
	TxsPerWorkerKey   = "txs-per-worker"
	KeyDirKey         = "key-dir"
	VersionKey        = "version"
	TimeoutKey        = "timeout"
	BatchSizeKey      = "batch-size"
	MetricsPortKey    = "metrics-port"
	MetricsOutputKey  = "metrics-output"
)
View Source
const Version = "v0.1.1"

Variables

View Source
var (
	ErrNoEndpoints = errors.New("must specify at least one endpoint")
	ErrNoWorkers   = errors.New("must specify non-zero number of workers")
	ErrNoTxs       = errors.New("must specify non-zero number of txs-per-worker")
)

Functions

func BuildFlagSet

func BuildFlagSet() *pflag.FlagSet

BuildFlagSet returns a complete set of flags for simulator

func BuildViper

func BuildViper(fs *pflag.FlagSet, args []string) (*viper.Viper, error)

Types

type Config

type Config struct {
	Endpoints     []string      `json:"endpoints"`
	MaxFeeCap     int64         `json:"max-fee-cap"`
	MaxTipCap     int64         `json:"max-tip-cap"`
	Workers       int           `json:"workers"`
	TxsPerWorker  uint64        `json:"txs-per-worker"`
	KeyDir        string        `json:"key-dir"`
	Timeout       time.Duration `json:"timeout"`
	BatchSize     uint64        `json:"batch-size"`
	MetricsPort   uint64        `json:"metrics-port"`
	MetricsOutput string        `json:"metrics-output"`
}

func BuildConfig

func BuildConfig(v *viper.Viper) (Config, error)

Jump to

Keyboard shortcuts

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