Documentation ¶
Index ¶
- func CloseAction(ctx context.Context, fn func(ctx context.Context) error) error
- func FindMonorepoRoot(startDir string) (string, error)
- func FlagNameToEnvVarName(f string, prefix string) string
- func FormatVersion(version string, gitCommit string, gitDate string, meta string) string
- func Parse256BitChainID(in string) (common.Hash, error)
- func ParseAddress(address string) (common.Address, error)
- func PrefixEnvVar(prefix, suffix string) []string
- func ValidateEnvVars(prefix string, flags []cli.Flag, log log.Logger)
- func WarnOnDeprecatedFlags(ctx *cli.Context, deprecatedFlags []cli.Flag, log log.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAction ¶
CloseAction runs the function in the background, until it finishes or until it is closed by the user with an interrupt.
func FindMonorepoRoot ¶ added in v1.4.2
FindMonorepoRoot will recursively search upwards for a go.mod file. This depends on the structure of the monorepo having a go.mod file at the root.
func FlagNameToEnvVarName ¶ added in v1.4.2
func FormatVersion ¶ added in v1.4.2
func Parse256BitChainID ¶ added in v1.9.3
Parse256BitChainID parses a 256-bit chain ID from a string. Chain IDs can be defined as either an integer or a hex string. If the string starts with "0x", it is treated as a hex string, otherwise it is treated as an integer string.
func ParseAddress ¶ added in v1.0.7
ParseAddress parses an ETH address from a hex string. This method will fail if the address is not a valid hexadecimal address.
func PrefixEnvVar ¶
PrefixEnvVar adds a prefix to the environment variable, and returns the env-var wrapped in a slice for usage with urfave CLI v2.
func ValidateEnvVars ¶ added in v1.0.8
ValidateEnvVars logs all env vars that are found where the env var is prefixed with the supplied prefix (like OP_BATCHER) but there is no actual env var with that name. It helps validate that the supplied env vars are in fact valid.
func WarnOnDeprecatedFlags ¶ added in v1.4.2
WarnOnDeprecatedFlags iterates through the provided deprecatedFlags and logs a warning for each that is set.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package clock provides an abstraction for time to enable testing of functionality that uses time as an input.
|
Package clock provides an abstraction for time to enable testing of functionality that uses time as an input. |
Implements interrupts: events that normally signal intent to cancel a Context, but may be repeated to encourage closure of new Contexts used to clean up resources.
|
Implements interrupts: events that normally signal intent to cancel a Context, but may be repeated to encourage closure of new Contexts used to clean up resources. |
Package sources exports a number of clients used to access ethereum chain data.
|
Package sources exports a number of clients used to access ethereum chain data. |
Package testlog provides a log handler for unit tests.
|
Package testlog provides a log handler for unit tests. |
This file contains CLI and env TLS configurations that can be used by clients or servers
|
This file contains CLI and env TLS configurations that can be used by clients or servers |
certman
Package certman provides live reloading of the certificate and key files used by the standard library http.Server.
|
Package certman provides live reloading of the certificate and key files used by the standard library http.Server. |