Skip to content

Commit

Permalink
chore: Codify flag naming including sentinel values (vectordotdev#17569)
Browse files Browse the repository at this point in the history
Starting with `SHOULD` while we feel this out some more. Might change to
`MUST` once we build up
more confidence.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed Jun 2, 2023
1 parent 8823561 commit 134578d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/specs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ interpreted as described in [RFC 2119].
- [Introduction](#introduction)
- [Scope](#scope)
- [Terminology](#terminology)
- [Flag](#flag)
- [Entity](#entity)
- [Option](#option)
- [Schema](#schema)
- [Naming](#naming)
- [Flag naming](#flag-naming)
- [Entity naming](#entity-naming)
- [Option naming](#option-naming)
- [Types](#types)
Expand All @@ -37,6 +39,10 @@ relevant specifications, such as the [component specification].

## Terminology

### Flag

"Flag" refers to a CLI flag provided when running Vector.

### Entity

"Entity" refers to a Vector concept used to model Vector's processing graph.
Expand All @@ -53,6 +59,16 @@ under entities and also used to define global Vector behavior.

### Naming

#### Flag naming

- MUST only contain ASCII alphanumeric, lowercase, and hyphens
- MUST be in kebab-case format when multiple words are used (e.g., `config-dir`)
- For flags that take a value, but are also able to be "disabled", they SHOULD NOT use a sentinel
value. Instead they SHOULD have a second flag added prefixed with `no-` and SHOULD leave off any
unit suffixes. For example, to disable `--graceful-shutdown-limit-secs`,
a `--no-graceful-shutdown` flag was added. Vector MUST NOT allow both the flag and its negative to
be specified at the same time.

#### Entity naming

- MUST only contain ASCII alphanumeric, lowercase, and underscores
Expand Down

0 comments on commit 134578d

Please sign in to comment.