pub fn from_vcap_services(
json: &str,
) -> Result<Option<ServiceBinding>, ServiceBindingError>Expand description
Parses VCAP_SERVICES JSON and extracts an AgentVisor binding.
A service entry matches if any of the following are true:
- The top-level key equals
"agentvisor"(managed service). - The entry’s
"label"equals"agentvisor". - The entry’s
"tags"array contains"agentvisor". - The entry’s
"name"equals"agentvisor".
User-provided services (created with cf cups) appear under the
"user-provided" top-level key, so matching by label, tag, or name
is needed to find them.