file
File-based discovery watches a single file on disk for additions and deletions of service clusters and instances. This mechanism is more brute-force than the other options, but provides discovery on platforms that may not otherwise be supported.
File Format
The format defines clusters and the associated instances. The cluster key in each object determines which service this is, and the instances array gives the list of host:port pairs for each instance.
Note the file can be either YAML or JSON format, selectable by the CLI flat
--formator environment variableGM_CONTROL_FILE_FORMAT.
YAML
- cluster: service-a
instances:
- host: localhost
port: 9080
- host: 10.0.2.237
port: 9080
- cluster: service-b
instances:
- host: 10.1.1.45
port: 443JSON
[
{
"cluster": "service-a",
"instances": [
{
"host": "localhost",
"port": 9080
},
{
"host": "10.0.2.237",
"port": 9080
}
]
},
{
"cluster": "service-b",
"instances": [
{
"host": "10.1.1.45",
"port": 443
}
]
}
]Last updated
Was this helpful?