mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-18 20:51:45 +00:00
hostinfo: detect Heroku Dyno.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
parent
3c1a73d370
commit
3ab587abe7
@ -65,6 +65,9 @@ func osVersionLinux() string {
|
|||||||
if inAwsLambda() {
|
if inAwsLambda() {
|
||||||
attrBuf.WriteString("; env=lm")
|
attrBuf.WriteString("; env=lm")
|
||||||
}
|
}
|
||||||
|
if inHerokuDyno() {
|
||||||
|
attrBuf.WriteString("; env=hr")
|
||||||
|
}
|
||||||
attr := attrBuf.String()
|
attr := attrBuf.String()
|
||||||
|
|
||||||
id := m["ID"]
|
id := m["ID"]
|
||||||
@ -135,3 +138,10 @@ func inAwsLambda() bool {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
func inHerokuDyno() bool {
|
||||||
|
// https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
||||||
|
if os.Getenv("PORT") != "" && os.Getenv("DYNO") != "" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user