config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "externalValidatorProxy"

Variables

View Source
var (
	LoggerLevelFlag = &cli.StringFlag{
		Name:     ModuleName + "." + "logger-level",
		Usage:    "Set the logger level",
		Category: utils.ExternalValidatorProxyCategory,
		Value:    "info",
		EnvVars:  []string{"PROXY_LOGGER_LEVEL"},
	}

	LoggerFormatFlag = &cli.StringFlag{
		Name:     ModuleName + "." + "logger-format",
		Usage:    "Set the logger format",
		Category: utils.ExternalValidatorProxyCategory,
		Value:    "text",
		EnvVars:  []string{"PROXY_LOGGER_FORMAT"},
	}

	AddressFlag = &cli.StringFlag{
		Name:     ModuleName + "." + "address",
		Usage:    "Set the listen addresses [comma separated to a max of 2] for the external validator proxies to connect to",
		Category: utils.ExternalValidatorProxyCategory,
	}

	RequestTimeoutMsFlag = &cli.IntFlag{
		Name:     ModuleName + "." + "request-timeout-ms",
		Usage:    "Set the request timeout in milliseconds",
		Category: utils.ExternalValidatorProxyCategory,
		Value:    ProxyConfigDefaults.RequestTimeoutMs,
	}

	RequestMaxRetriesFlag = &cli.IntFlag{
		Name:     ModuleName + "." + "request-max-retries",
		Usage:    "Set the request max retries",
		Category: utils.ExternalValidatorProxyCategory,
		Value:    ProxyConfigDefaults.RequestMaxRetries,
	}
)
View Source
var ProxyConfigDefaults = ProxyConfig{
	LoggerLevel:       "info",
	LoggerFormat:      "text",
	Addresses:         []*url.URL{},
	RequestTimeoutMs:  12000,
	RequestMaxRetries: 3,
}

Functions

func NewCommand

func NewCommand() *cli.Command

Types

type ProxyConfig

type ProxyConfig struct {
	LoggerLevel       string
	LoggerFormat      string
	Addresses         []*url.URL
	RequestTimeoutMs  int
	RequestMaxRetries int
}

Jump to

Keyboard shortcuts

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