mirror of https://github.com/status-im/consul.git
Added ServiceMeta documentation in website source
This commit is contained in:
parent
b259b1609c
commit
6022c7a209
|
@ -53,6 +53,9 @@ $ curl \
|
|||
"Service": "redis",
|
||||
"Tags": [],
|
||||
"Address": "",
|
||||
"ServiceMeta": {
|
||||
"redis_version": "4.0"
|
||||
},
|
||||
"Port": 8000
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +99,9 @@ The table below shows this endpoint's support for
|
|||
provided, the agent's address is used as the address for the service during
|
||||
DNS queries.
|
||||
|
||||
- `ServiceMeta` `(map<string|string>: nil)` - Specifies arbitrary KV metadata
|
||||
linked to the service instance.
|
||||
|
||||
- `Port` `(int: 0)` - Specifies the port of the service.
|
||||
|
||||
- `Check` `(Check: nil)` - Specifies a check. Please see the
|
||||
|
@ -103,7 +109,7 @@ The table below shows this endpoint's support for
|
|||
accepted fields. If you don't provide a name or id for the check then they
|
||||
will be generated. To provide a custom id and/or name set the `CheckID`
|
||||
and/or `Name` field.
|
||||
|
||||
|
||||
- `Checks` `(array<Check>: nil`) - Specifies a list of checks. Please see the
|
||||
[check documentation](/api/agent/check.html) for more information about the
|
||||
accepted fields. If you don't provide a name or id for the check then they
|
||||
|
@ -147,6 +153,9 @@ The table below shows this endpoint's support for
|
|||
],
|
||||
"Address": "127.0.0.1",
|
||||
"Port": 8000,
|
||||
"ServiceMeta": {
|
||||
"redis_version": "4.0"
|
||||
},
|
||||
"EnableTagOverride": false,
|
||||
"Check": {
|
||||
"DeregisterCriticalServiceAfter": "90m",
|
||||
|
|
|
@ -54,7 +54,7 @@ The table below shows this endpoint's support for
|
|||
- `Service` `(Service: nil)` - Specifies to register a service. If `ID` is not
|
||||
provided, it will be defaulted to the value of the `Service.Service` property.
|
||||
Only one service with a given `ID` may be present per node. The service
|
||||
`Tags`, `Address`, and `Port` fields are all optional.
|
||||
`Tags`, `Address`, `ServiceMeta` and `Port` fields are all optional.
|
||||
|
||||
- `Check` `(Check: nil)` - Specifies to register a check. The register API
|
||||
manipulates the health check entry in the Catalog, but it does not setup the
|
||||
|
@ -105,6 +105,9 @@ and vice versa. A catalog entry can have either, neither, or both.
|
|||
"v1"
|
||||
],
|
||||
"Address": "127.0.0.1",
|
||||
"ServiceMeta": {
|
||||
"redis_version": "4.0"
|
||||
},
|
||||
"Port": 8000
|
||||
},
|
||||
"Check": {
|
||||
|
@ -432,6 +435,9 @@ $ curl \
|
|||
"ServiceID": "32a2a47f7992:nodea:5000",
|
||||
"ServiceName": "foobar",
|
||||
"ServicePort": 5000,
|
||||
"ServiceMeta": {
|
||||
"foobar_meta_value": "baz"
|
||||
},
|
||||
"ServiceTags": [
|
||||
"tacos"
|
||||
]
|
||||
|
@ -467,6 +473,8 @@ $ curl \
|
|||
|
||||
- `ServiceName` is the name of the service
|
||||
|
||||
- `ServiceMeta` is a list of user-defined metadata key/value pairs for the service
|
||||
|
||||
- `ServicePort` is the port number of the service
|
||||
|
||||
- `ServiceTags` is a list of tags for the service
|
||||
|
@ -529,6 +537,7 @@ $ curl \
|
|||
"ID": "consul",
|
||||
"Service": "consul",
|
||||
"Tags": null,
|
||||
"ServiceMeta": {},
|
||||
"Port": 8300
|
||||
},
|
||||
"redis": {
|
||||
|
@ -537,6 +546,9 @@ $ curl \
|
|||
"Tags": [
|
||||
"v1"
|
||||
],
|
||||
"ServiceMeta": {
|
||||
"redis_version": "4.0"
|
||||
},
|
||||
"Port": 8000
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,6 +216,9 @@ $ curl \
|
|||
"Service": "redis",
|
||||
"Tags": ["primary"],
|
||||
"Address": "10.1.10.12",
|
||||
"ServiceMeta": {
|
||||
"redis_version": "4.0"
|
||||
},
|
||||
"Port": 8000
|
||||
},
|
||||
"Checks": [
|
||||
|
|
|
@ -241,6 +241,7 @@ The table below shows this endpoint's support for
|
|||
"Near": "node1",
|
||||
"OnlyPassing": false,
|
||||
"Tags": ["primary", "!experimental"],
|
||||
"ServiceMeta": {"redis_version": "4.0"},
|
||||
"NodeMeta": {"instance_type": "m3.large"}
|
||||
},
|
||||
"DNS": {
|
||||
|
@ -313,6 +314,7 @@ $ curl \
|
|||
},
|
||||
"OnlyPassing": false,
|
||||
"Tags": ["primary", "!experimental"],
|
||||
"ServiceMeta": {"redis_version": "4.0"},
|
||||
"NodeMeta": {"instance_type": "m3.large"}
|
||||
},
|
||||
"DNS": {
|
||||
|
@ -510,6 +512,7 @@ $ curl \
|
|||
"ID": "redis",
|
||||
"Service": "redis",
|
||||
"Tags": null,
|
||||
"ServiceMeta": {"redis_version": "4.0"},
|
||||
"Port": 8000
|
||||
},
|
||||
"Checks": [
|
||||
|
@ -616,6 +619,7 @@ $ curl \
|
|||
},
|
||||
"OnlyPassing": true,
|
||||
"Tags": ["primary"],
|
||||
"ServiceMeta": { "mysql_version": "5.7.20" },
|
||||
"NodeMeta": {"instance_type": "m3.large"}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue