-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathflags.go
30 lines (25 loc) · 900 Bytes
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package flags
import (
common "github.com/base-org/blob-archiver/common/flags"
opservice "github.com/ethereum-optimism/optimism/op-service"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
opmetrics "github.com/ethereum-optimism/optimism/op-service/metrics"
"github.com/urfave/cli/v2"
)
const EnvVarPrefix = "BLOB_API"
var (
ListenAddressFlag = &cli.StringFlag{
Name: "api-listen-address",
Usage: "The address to list for new requests on",
EnvVars: opservice.PrefixEnvVar(EnvVarPrefix, "LISTEN_ADDRESS"),
Value: "0.0.0.0:8000",
}
)
func init() {
Flags = append(Flags, common.CLIFlags(EnvVarPrefix)...)
Flags = append(Flags, opmetrics.CLIFlags(EnvVarPrefix)...)
Flags = append(Flags, oplog.CLIFlags(EnvVarPrefix)...)
Flags = append(Flags, ListenAddressFlag)
}
// Flags contains the list of configuration options available to the binary.
var Flags []cli.Flag