public interface ServiceDataPostProcessor
Modifier and Type | Method and Description |
---|---|
CloudFoundryRawServiceData |
process(CloudFoundryRawServiceData serviceData)
Process raw service data as read from VCAP_SERVICES.
|
CloudFoundryRawServiceData process(CloudFoundryRawServiceData serviceData)
CloudFoundryRawServiceData
data structure.
If the VCAP_SERVICES environment variable for an application contains the following:
"VCAP_SERVICES": {
"mysql": [
{
"label": "mysql",
"name": "mysql-db",
"plan": "100mb",
"tags": [ "mysql", "relational" ],
"credentials": {
"jdbcUrl": "jdbc:mysql://mysql-broker:3306/db?user=username&password=password",
"uri": "mysql://username:password@mysql-broker:3306/db?reconnect=true",
}
}
],
"rabbitmq": [
{
"label": "rabbitmq",
"name": "rabbit-queue",
"plan": "standard",
"tags": [ "rabbitmq", "messaging" ],
"credentials": {
"http_api_uri": "https://username:password@rabbitmq-broker:12345/api",
"uri": "amqp://username:password@rabbitmq-broker/vhost",
}
}
]
}
Then the CloudFoundryRawServiceData
data structure would contain the equivalent of this:
{
"mysql": [
{
"label": "mysql",
"name": "mysql-db",
"plan": "100mb",
"tags": [ "mysql", "relational" ],
"credentials": {
"jdbcUrl": "jdbc:mysql://mysql-broker:3306/db?user=username&password=password",
"uri": "mysql://username:password@mysql-broker:3306/db?reconnect=true",
}
}
]
"rabbitmq": [
{
"label": "rabbitmq",
"name": "rabbit-queue",
"plan": "standard",
"tags": [ "rabbitmq", "messaging" ],
"credentials": {
"http_api_uri": "https://username:password@rabbitmq-broker:12345/api",
"uri": "amqp://username:password@rabbitmq-broker/vhost",
}
}
]
}
serviceData
- the service data parsed from VCAP_SERVICES