-
Notifications
You must be signed in to change notification settings - Fork 0
/
flags.go
58 lines (48 loc) · 1.15 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2020 Stafi Protocol
// SPDX-License-Identifier: LGPL-3.0-only
package config
import (
log "github.com/ChainSafe/log15"
"github.com/urfave/cli/v2"
)
var (
ConfigFileFlag = &cli.StringFlag{
Name: "config",
Usage: "TOML configuration file",
}
VerbosityFlag = &cli.StringFlag{
Name: "verbosity",
Usage: "Supports levels crit (silent) to trce (trace)",
Value: log.LvlInfo.String(),
}
KeystorePathFlag = &cli.StringFlag{
Name: "keystore",
Usage: "Path to keystore directory",
Value: "",
}
BlockstorePathFlag = &cli.StringFlag{
Name: "blockstore",
Usage: "Specify path for blockstore",
Value: "", // Empty will use home dir
}
FreshStartFlag = &cli.BoolFlag{
Name: "fresh",
Usage: "Disables loading from blockstore at start. Opts will still be used if specified.",
}
LatestBlockFlag = &cli.BoolFlag{
Name: "latest",
Usage: "Overrides blockstore and start block, starts from latest block",
}
)
// Metrics flags
var (
MetricsFlag = &cli.BoolFlag{
Name: "metrics",
Usage: "Enables metric server",
}
MetricsPort = &cli.IntFlag{
Name: "metricsPort",
Usage: "Port to serve metrics on",
Value: 8001,
}
)