Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DatabaseUsername = &cli.StringFlag{ Name: "db.username", Usage: "Database connection username", Required: true, Category: commonCategory, EnvVars: []string{"DATABASE_USER"}, } DatabasePassword = &cli.StringFlag{ Name: "db.password", Usage: "Database connection password", Required: true, Category: commonCategory, EnvVars: []string{"DATABASE_PASSWORD"}, } DatabaseHost = &cli.StringFlag{ Name: "db.host", Usage: "Database connection host", Required: true, Category: commonCategory, EnvVars: []string{"DATABASE_HOST"}, } DatabaseName = &cli.StringFlag{ Name: "db.name", Usage: "Database connection name", Required: true, Category: commonCategory, EnvVars: []string{"DATABASE_NAME"}, } )
View Source
var ( DatabaseMaxIdleConns = &cli.Uint64Flag{ Name: "db.maxIdleConns", Usage: "Database max idle connections", Value: 50, Category: commonCategory, EnvVars: []string{"DATABASE_MAX_IDLE_CONNS"}, } DatabaseMaxOpenConns = &cli.Uint64Flag{ Name: "db.maxOpenConns", Usage: "Database max open connections", Value: 200, Category: commonCategory, EnvVars: []string{"DATABASE_MAX_OPEN_CONNS"}, } DatabaseConnMaxLifetime = &cli.Uint64Flag{ Name: "db.connMaxLifetime", Usage: "Database connection max lifetime in seconds", Value: 10, Category: commonCategory, EnvVars: []string{"DATABASE_CONN_MAX_LIFETIME"}, } MetricsHTTPPort = &cli.Uint64Flag{ Name: "metrics.port", Usage: "Port to run metrics http server on", Category: commonCategory, Value: 6061, EnvVars: []string{"METRICS_HTTP_PORT"}, } )
View Source
var ( GuardianProverContractAddress = &cli.StringFlag{ Name: "guardianProverContractAddress", Usage: "Address of the GuardianProver contract", Category: healthCheckCategory, EnvVars: []string{"GUARDIAN_PROVER_CONTRACT_ADDRESS"}, Required: true, } L1RPCUrl = &cli.StringFlag{ Name: "l1RpcUrl", Usage: "L1 RPC Url", Category: healthCheckCategory, EnvVars: []string{"L1_RPC_URL"}, Required: true, } L2RPCUrl = &cli.StringFlag{ Name: "l2RpcUrl", Usage: "L2 RPC Url", Category: healthCheckCategory, EnvVars: []string{"L2_RPC_URL"}, Required: true, } )
required flags
View Source
var ( Backoff = &cli.DurationFlag{ Name: "backoff", Usage: "Backoff in time units (ie: 5s)", Value: 1 * time.Second, Category: healthCheckCategory, EnvVars: []string{"BACKOFF"}, } HTTPPort = &cli.Uint64Flag{ Name: "http.port", Usage: "Port to run http server on", Category: healthCheckCategory, Value: 4102, EnvVars: []string{"HTTP_PORT"}, } CORSOrigins = &cli.StringFlag{ Name: "http.corsOrigins", Usage: "Comma-delinated list of cors origins", Category: healthCheckCategory, Value: "*", EnvVars: []string{"HTTP_CORS_ORIGINS"}, } )
View Source
var CommonFlags = []cli.Flag{ DatabaseUsername, DatabasePassword, DatabaseHost, DatabaseName, DatabaseMaxIdleConns, DatabaseConnMaxLifetime, DatabaseMaxOpenConns, MetricsHTTPPort, }
All common flags.
View Source
var HealthCheckFlags = MergeFlags(CommonFlags, []cli.Flag{ HTTPPort, CORSOrigins, Backoff, GuardianProverContractAddress, L1RPCUrl, L2RPCUrl, })
Functions ¶
func MergeFlags ¶
func MergeFlags(groups ...[]cli.Flag) []cli.Flag
MergeFlags merges the given flag slices.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.