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"}, } 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"}, } )
View Source
var ( StartingBlockID = &cli.Uint64Flag{ Name: "startingBlockID", Usage: "Block ID to start indexing from", Category: indexerCategory, EnvVars: []string{"STARTING_BLOCK_ID"}, } RPCUrl = &cli.StringFlag{ Name: "rpcURL", Usage: "Websockets RPC Url", Category: indexerCategory, Required: true, EnvVars: []string{"RPC_URL"}, } BeaconURL = &cli.StringFlag{ Name: "beaconURL", Usage: "Websockets Beacon Url", Category: indexerCategory, Required: true, EnvVars: []string{"BEACON_URL"}, } ContractAddress = &cli.StringFlag{ Name: "contractAddress", Usage: "Contract address", Category: indexerCategory, Required: true, EnvVars: []string{"TAIKO_L1_CONTRACT_ADDRESS"}, } BackOffMaxRetrys = &cli.Uint64Flag{ Name: "backoff.maxRetrys", Usage: "Max retry times when there is an error", Category: commonCategory, Value: 10, EnvVars: []string{"BACKOFF_MAX_RETRIES"}, } BackOffRetryInterval = &cli.DurationFlag{ Name: "backoff.retryInterval", Usage: "Retry interval in seconds when there is an error", Category: commonCategory, Value: 12 * time.Second, EnvVars: []string{"BACKOFF_RETRY_INTERVAL"}, } )
View Source
var APIFlags = MergeFlags(DatabaseFlags, CommonFlags, []cli.Flag{ Port, })
View Source
var CommonFlags = []cli.Flag{ MetricsHTTPPort, }
View Source
var DatabaseFlags = []cli.Flag{ DatabaseHost, DatabaseUsername, DatabasePassword, DatabaseName, DatabaseConnMaxLifetime, DatabaseMaxOpenConns, DatabaseMaxIdleConns, }
View Source
var IndexerFlags = MergeFlags(DatabaseFlags, CommonFlags, []cli.Flag{ StartingBlockID, RPCUrl, BeaconURL, ContractAddress, BackOffMaxRetrys, BackOffRetryInterval, })
View Source
var ( 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 ( Port = &cli.UintFlag{ Name: "httpPort", Usage: "Port to run server on", Category: apiCategory, EnvVars: []string{"HTTP_PORT"}, } )
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.