Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
FINISH: add flag for tendermint/port monitors (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
RevelationOfTuring authored Mar 2, 2021
1 parent d951ae2 commit 9b4bf23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const (
FlagPruningKeepRecent = "pruning-keep-recent"
FlagPruningKeepEvery = "pruning-keep-every"
FlagPruningInterval = "pruning-interval"
FlagLocalRpcPort = "local-rpc-port"
FlagPortMonitor = "netstat"
)

// StartCmd runs the service passed in, either stand-alone or in-process with
Expand Down Expand Up @@ -111,11 +113,15 @@ which accepts a path for the resulting pprof file.
cmd.Flags().Uint64(FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')")
cmd.Flags().Uint64(FlagPruningKeepEvery, 0, "Offset heights to keep on disk after 'keep-every' (ignored if pruning is not 'custom')")
cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')")
cmd.Flags().String(FlagLocalRpcPort, "", "Local rpc port for mempool and block monitor on cosmos layer(ignored if mempool/block monitoring is not required)")
cmd.Flags().String(FlagPortMonitor, "", "Local target ports for connecting number monitoring(ignored if connecting number monitoring is not required)")
viper.BindPFlag(FlagTrace, cmd.Flags().Lookup(FlagTrace))
viper.BindPFlag(FlagPruning, cmd.Flags().Lookup(FlagPruning))
viper.BindPFlag(FlagPruningKeepRecent, cmd.Flags().Lookup(FlagPruningKeepRecent))
viper.BindPFlag(FlagPruningKeepEvery, cmd.Flags().Lookup(FlagPruningKeepEvery))
viper.BindPFlag(FlagPruningInterval, cmd.Flags().Lookup(FlagPruningInterval))
viper.BindPFlag(FlagLocalRpcPort, cmd.Flags().Lookup(FlagLocalRpcPort))
viper.BindPFlag(FlagPortMonitor, cmd.Flags().Lookup(FlagPortMonitor))

registerRestServerFlags(cmd)

Expand Down

0 comments on commit 9b4bf23

Please sign in to comment.