Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FlagCfg is the flag for the configuration file(s) FlagCfg = "cfg" // FlagComponents is the flag for the list of components to run FlagComponents = "components" // EnvVarPrefix is the prefix for the environment variables that override config values EnvVarPrefix = "CDK_PROXY" // ConfigType is the format of the configuration files ConfigType = "toml" )
View Source
const ( // PROXY name to identify the bridge-service proxy component PROXY = "proxy" // TRACKER name to identify the bridge tracker component TRACKER = "tracker" )
View Source
const DefaultValues = `` /* 4994-byte string literal not displayed */
DefaultValues is the default configuration
Variables ¶
This section is empty.
Functions ¶
func SHA1 ¶
SHA1 returns the sha1sum (hex) of the effective configuration cfg was decoded into: config file(s), defaults, and any CDK_PROXY_* environment overrides. It identifies the effective configuration of an instance (exposed by the tracker health endpoint), so instances behind a proxy can be checked to run the same configuration; hashing only the input files would miss environment overrides and let differently-behaving instances report the same fingerprint.
func ValidateComponents ¶
ValidateComponents validates that all provided components are known/supported by the proxy binary.
Types ¶
type Config ¶
type Config struct {
// Log configures the logger
Log log.Config `mapstructure:"Log"`
// L1RPC is the L1 JSON-RPC endpoint used to enumerate the rollup manager's networks and to
// poll the on-chain events the bridge service finder watches
L1RPC ethermanconfig.RPCClientConfig `mapstructure:"L1RPC"`
// BridgeServiceFinder configures the networkID -> bridge service URL / JSON-RPC resolver shared
// by the proxy and tracker components
BridgeServiceFinder bridgeservicefinder.Config `mapstructure:"BridgeServiceFinder"`
// REST configures the shared HTTP server where every component of this binary registers
// its routes (tracker REST/WS endpoints, proxy routes)
REST aggkitcommon.RESTConfig `mapstructure:"REST"`
// Tracker configures the bridge tracker component (only its file-borne fields; the
// programmatic ones are wired by the binary, see cmd)
Tracker bridgetracker.Config `mapstructure:"Tracker"`
}
Config holds the full configuration of the proxy component
Click to show internal directories.
Click to hide internal directories.