Experimental Optional changeHow the source detects file changes. The two modes are alternatives.
polling, the default, examines the files on a fixed interval and reloads when the
modification time or the size of a file changes. It works on every filesystem, including
network mounts and directories whose contents are swapped through symbolic links.
watching reloads in response to filesystem change notifications for the directories that
contain the files. It reacts faster than polling. It depends on notifications, which some
filesystems do not deliver reliably.
Optional duplicateWhat to do when the same flag or segment key appears in more than one file. fail, the
default, treats the reload as failed and keeps the previously loaded overrides. ignore
keeps the entry from the first configured file that defines the key and discards the others.
The paths of the files to read, in precedence order. At least one path is required. The order decides which file wins under the duplicate keys handling when the same key appears in more than one file.
Optional pollThe interval between examinations of the files in polling mode, in seconds. The default is
Optional yamlA YAML parser for YAML files. The SDK does not include one; to read YAML files, supply a
parser that produces the same structure as JSON.parse, for example the parse function
of the yaml package. A YAML file configured without a parser fails client construction.
Generated using TypeDoc
Configuration of the file-based override source.
The source reads flag and segment overrides from one or more local files and reloads them as the files change. The files use the same document format as the file data source: a JSON or YAML document with optional
flags,flagValues, andsegmentsmembers.flagValuesentries expand into full flag definitions that return the given value for every context.A configured file that does not exist contributes no overrides. It can be created later, and deleting it removes its overrides. A file that exists but cannot be read or parsed fails that reload: the previously loaded overrides stay in effect, the failure is logged, and the source retries. Every applied change is logged at Info level with the overrides in effect and what each file supplied.
Example
Flag overrides are currently experimental and subject to change.