MCPcopy
hub / github.com/hashicorp/vault / Flags

Method Flags

command/server.go:179–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177}
178
179func (c *ServerCommand) Flags() *FlagSets {
180 set := c.flagSet(FlagSetHTTP)
181
182 f := set.NewFlagSet("Command Options")
183
184 // Augment with the log flags
185 f.addLogFlags(&c.logFlags)
186
187 f.StringSliceVar(&StringSliceVar{
188 Name: "config",
189 Target: &c.flagConfigs,
190 Completion: complete.PredictOr(
191 complete.PredictFiles("*.hcl"),
192 complete.PredictFiles("*.json"),
193 complete.PredictDirs("*"),
194 ),
195 Usage: "Path to a configuration file or directory of configuration " +
196 "files. This flag can be specified multiple times to load multiple " +
197 "configurations. If the path is a directory, all files which end in " +
198 ".hcl or .json are loaded.",
199 })
200
201 f.BoolVar(&BoolVar{
202 Name: "exit-on-core-shutdown",
203 Target: &c.flagExitOnCoreShutdown,
204 Default: false,
205 Usage: "Exit the vault server if the vault core is shutdown.",
206 })
207
208 f.BoolVar(&BoolVar{
209 Name: "recovery",
210 Target: &c.flagRecovery,
211 Usage: "Enable recovery mode. In this mode, Vault is used to perform recovery actions. " +
212 "Using a recovery token, \"sys/raw\" API can be used to manipulate the storage.",
213 })
214
215 f.StringSliceVar(&StringSliceVar{
216 Name: "experiment",
217 Target: &c.flagExperiments,
218 Completion: complete.PredictSet(experiments.ValidExperiments()...),
219 Usage: "Name of an experiment to enable. Experiments should NOT be used in production, and " +
220 "the associated APIs may have backwards incompatible changes between releases. This " +
221 "flag can be specified multiple times to specify multiple experiments. This can also be " +
222 fmt.Sprintf("specified via the %s environment variable as a comma-separated list. ", EnvVaultExperiments) +
223 "Valid experiments are: " + strings.Join(experiments.ValidExperiments(), ", "),
224 })
225
226 f.StringVar(&StringVar{
227 Name: "pprof-dump-dir",
228 Target: &c.flagCLIDump,
229 Completion: complete.PredictDirs("*"),
230 Usage: "Directory where generated profiles are created. If left unset, files are not generated.",
231 })
232
233 f = set.NewFlagSet("Dev Options")
234
235 f.BoolVar(&BoolVar{
236 Name: "dev",

Callers 3

HelpMethod · 0.95
AutocompleteFlagsMethod · 0.95
RunMethod · 0.95

Calls 8

addLogFlagsMethod · 0.95
StringSliceVarMethod · 0.95
BoolVarMethod · 0.95
StringVarMethod · 0.95
IntVarMethod · 0.95
ValidExperimentsFunction · 0.92
flagSetMethod · 0.80
NewFlagSetMethod · 0.80

Tested by

no test coverage detected