file

Grey Matter Fabric supports service discovery from a flat file. See the Grey Matter Control file discovery setup documentation for how to configure this with Grey Matter Control.

File Discovery and Format

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.

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. The file format is described generically here in the setup documentation, and an example for each possible format is below.

File Examples

- 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
[
{
"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
}
]
}
]