Documentation ¶
Index ¶
- Constants
- func AvailabilityZone() (string, error)
- func Datacenter() (string, error)
- func ExecutorID() (string, error)
- func Hostname() (string, error)
- func IP() net.IP
- func MarathonAppID() (string, error)
- func MesosAgentEndpoint() (string, error)
- func OsHostname() (string, error)
- func Region() (string, error)
- func TaskID() (string, error)
- type Env
Constants ¶
const ( // LocalEnv represents local environment. LocalEnv = Env("local") // DevEnv represents development environment. DevEnv = Env("dev") // TestEnv represents test environment. TestEnv = Env("test") // ProdEnv represents production environment. ProdEnv = Env("prod") )
Variables ¶
This section is empty.
Functions ¶
func AvailabilityZone ¶
AvailabilityZone return the name of runtime availability zone. It returns empty string with erro if it cannot determine the name.
func Datacenter ¶
Datacenter returns the name of runtime datacenter. It returns empty string with error if it cannot determine the name.
func ExecutorID ¶
ExecutorID returns mesos executor ID. It returns empty string with error if it cannot determine the ID.
func MarathonAppID ¶
MarathonAppID returns ID of Marathon application in which context the process is running. It returns empty string with error if it cannot determine the ID.
func MesosAgentEndpoint ¶
MesosAgentEndpoint returns Mesos Agent endpoint. It returns empty string with error if it cannot determine Agent endpoint.
func OsHostname ¶
OsHostname returns result of calling hostname -f command, resorting to golang's os package if necessary