Skip to content

Commit

Permalink
feat: add docs
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksei Muratov <[email protected]>
  • Loading branch information
alemrtv committed Nov 10, 2024
1 parent fa5e7ec commit 4145161
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/reference/flag-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ For example, when accessing flagd via HTTP, the POST body may look like this:

The evaluation context can be accessed in targeting rules using the `var` operation followed by the evaluation context property name.

The evaluation context can be appended by arbitrary key value pairs
via the `-X` command line flag.

| Description | Example |
| -------------------------------------------------------------- | ---------------------------------------------------- |
| Retrieve property from the evaluation context | `#!json { "var": "email" }` |
Expand Down
1 change: 1 addition & 0 deletions docs/reference/flagd-cli/flagd_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ flagd start [flags]
### Options

```
-X, --context-value stringToString add arbitrary key value pairs to the flag value evaluation context (default [])
-C, --cors-origin strings CORS allowed origins, * will allow all origins
-h, --help help for start
-z, --log-format string Set the logging format, e.g. console or json (default "console")
Expand Down
2 changes: 1 addition & 1 deletion flagd/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func init() {
flags.StringP(otelCAPathFlagName, "A", "", "tls certificate authority path to use with OpenTelemetry collector")
flags.DurationP(otelReloadIntervalFlagName, "I", time.Hour, "how long between reloading the otel tls certificate "+
"from disk")
flags.StringToStringP(contextValueFlagName, "kv", map[string]string{}, "add arbitrary key value pairs "+
flags.StringToStringP(contextValueFlagName, "X", map[string]string{}, "add arbitrary key value pairs "+
"to the flag value evaluation context")

_ = viper.BindPFlag(corsFlagName, flags.Lookup(corsFlagName))
Expand Down

0 comments on commit 4145161

Please sign in to comment.