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_APPLICATION
as a typed Application - get_
database_ url - Get’s the value from
DATABASE_URL
as a typed Uri - get_
home - Get’s the value from
HOME
as a typed PathBuf - get_
instance_ address - Get’s the value from
CF_INSTANCE_ADDR
as a typed SocketAddr - get_
instance_ guid - Get’s the value from
CF_INSTANCE_GUID
as a typed GUID - get_
instance_ index - Get’s the value from
CF_INSTANCE_INDEX
as a typed u128 - get_
instance_ internal_ ip - Get’s the value from
CF_INSTANCE_INTERNAL_IP
as a typed IpAddr - get_
instance_ ip - Get’s the value from
CF_INSTANCE_IP
as a typed IpAddr - get_
instance_ port - Get’s the value from
CF_INSTANCE_PORT
as a typed u16 - get_
lang - Get’s the value from
LANG
as a typed Locale - get_
memory_ limit - Get’s the value from
MEMORY_LIMIT
as a typed MemoryLimit - get_
port - Get’s the value from
PORT
as a typed 16 - get_pwd
- Get’s the value from
PWD
as a typed PathBuf - get_
service_ by_ name - Get’s you a single service from
VCAP_SERVICES
by it’s name - get_
services - Get’s the value from
VCAP_SERVICES
as a typed HashMap of Strings and a list of Services - get_
services_ by_ type - Get’s you a a list services from
VCAP_SERVICES
by their type - get_
tmp_ dir - Get’s the value from
TMPDIR
as a typed PathBuf - get_
user - Get’s the value from
USER
- is_
cf_ env - Checks if
VCAP_APPLICATION
is defined, if so uses as the indicator that the app is running in a Cloud Foundry Environment.