-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (27 loc) · 791 Bytes
/
main.go
File metadata and controls
32 lines (27 loc) · 791 Bytes
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
package main
import (
"os"
"context"
"github.com/ethereum-optimism/optimism/op-service/cliapp"
"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/log"
"github.com/urfave/cli/v2"
"github.com/zhiqiangxu/op_monitor/monitor"
)
func main() {
oplog.SetupDefaults()
app := cli.NewApp()
app.Name = "op-monitor"
app.Copyright = "Copyright in 2025"
app.Flags = cliapp.ProtectFlags(monitor.Flags)
app.Commands = []*cli.Command{
&monitor.UtilityCmd,
}
app.Action = cliapp.LifecycleCmd(monitor.Main())
ctx := ctxinterrupt.WithSignalWaiterMain(context.Background())
err := app.RunContext(ctx, os.Args)
if err != nil {
log.Crit("Application failed", "message", err)
}
}