Skip to content

Commit 5a6559b

Browse files
committed
Clarify function name injected via env-var
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent f873412 commit 5a6559b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/reference/workloads.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,20 @@ functions:
221221
com.openfaas.ready.http.periodSeconds: 5
222222
```
223223

224-
### Function information
224+
### How to find the function's name at runtime
225225

226226
!!! info "OpenFaaS Pro feature"
227227
This feature is part of the [OpenFaaS Pro](/openfaas-pro/introduction) distribution.
228228

229229
OpenFaaS exposes some information to functions through environment variables.
230230

231-
The function name is made available in every function as an environment variable `OPENFAAS_NAME`.
231+
The function name is made available in every function as an environment variable `OPENFAAS_NAME`. You can test this by deploying the `env` function the store and invoking it, i.e.
232+
233+
```bash
234+
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
235+
HOSTNAME=env-648d57f457-xtvwg
236+
OPENFAAS_NAME=env
237+
fprocess=env
238+
HOME=/home/app
239+
Http_X_Forwarded_Proto=https
240+
```

0 commit comments

Comments
 (0)