config

package
v0.6.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

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