Expand description
Easy and typed abstraction on Cloud Foundry Environment variables
It allows you to get:
- Services, optionally filtered by name or type
- Application infos
- Cloud Foundry app instance set variables, most of the times starting with
CF_
It’s meant to get you away from boilerplating and get you started with typed variables while keeping simplicity
Modules§
Functions§
- get_
application_ info - Get’s you the information from
VCAP_APPLICATIONas a typed Application - get_
database_ url - Get’s the value from
DATABASE_URLas a typed Uri - get_
home - Get’s the value from
HOMEas a typed PathBuf - get_
instance_ address - Get’s the value from
CF_INSTANCE_ADDRas a typed SocketAddr - get_
instance_ guid - Get’s the value from
CF_INSTANCE_GUIDas a typed GUID - get_
instance_ index - Get’s the value from
CF_INSTANCE_INDEXas a typed u128 - get_
instance_ internal_ ip - Get’s the value from
CF_INSTANCE_INTERNAL_IPas a typed IpAddr - get_
instance_ ip - Get’s the value from
CF_INSTANCE_IPas a typed IpAddr - get_
instance_ port - Get’s the value from
CF_INSTANCE_PORTas a typed u16 - get_
lang - Get’s the value from
LANGas a typed Locale - get_
memory_ limit - Get’s the value from
MEMORY_LIMITas a typed MemoryLimit - get_
port - Get’s the value from
PORTas a typed 16 - get_pwd
- Get’s the value from
PWDas a typed PathBuf - get_
service_ by_ name - Get’s you a single service from
VCAP_SERVICESby it’s name - get_
services - Get’s the value from
VCAP_SERVICESas a typed HashMap of Strings and a list of Services - get_
services_ by_ type - Get’s you a a list services from
VCAP_SERVICESby their type - get_
tmp_ dir - Get’s the value from
TMPDIRas a typed PathBuf - get_
user - Get’s the value from
USER - is_
cf_ env - Checks if
VCAP_APPLICATIONis defined, if so uses as the indicator that the app is running in a Cloud Foundry Environment.