Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make status port configurable via command line args #380

Merged
merged 4 commits into from
Dec 12, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var (
inMemoryMode bool
tableSize int64
requestUUID string
statusPort uint

// Config is the populated *configuration.Configuration from
// the configurationFile. If none is provided, this is set
Expand Down Expand Up @@ -288,6 +289,13 @@ default values.`,
"requestUUID configures the requestUUID in logs, which aims to enable search logs by requestUUID",
)

checkDataCmd.Flags().UintVar(
&statusPort,
"status-port",
0,
"status-port configures the status query port, this will override the status_port",
)

rootCmd.AddCommand(checkDataCmd)
checkConstructionCmd.Flags().StringVar(
&asserterConfigurationFile,
Expand Down Expand Up @@ -419,6 +427,10 @@ func initConfig() {
if len(requestUUID) != 0 {
Config.RequestUUID = requestUUID
}

if statusPort > 0 {
Config.Data.StatusPort = statusPort
}
}

func ensureDataDirectoryExists() {
Expand Down