File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ You can usually do one of the following:
238
238
Example:
239
239
240
240
``` bash
241
- faas-cli new --lang go test-this
241
+ faas-cli new --lang golang-middleware test-this
242
242
243
243
faas-cli build -f test-this.yml
244
244
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Create a new function:
37
37
38
38
``` bash
39
39
export OPENFAAS_PREFIX=ghcr.io/openfaas
40
- faas-cli new --lang go provision-customer
40
+ faas-cli new --lang golang-middleware provision-customer
41
41
```
42
42
43
43
Now add an annotation for the ` payment.created ` topic, so that the ` provision-customer ` function is invoked for any message received:
@@ -52,7 +52,7 @@ functions:
52
52
provision-customer :
53
53
annotations :
54
54
topic : payment.created
55
- lang : go
55
+ lang : golang-middleware
56
56
handler : ./provision-customer
57
57
image : ghcr.io/openfaas:provision-customer
58
58
` ` `
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ Create a new function using the `go` template:
55
55
56
56
``` bash
57
57
export OPENFAAS_PREFIX=ttl.sh/daily-job:1h
58
- faas-cli new --lang go daily-job
58
+ faas-cli new --lang golang-middleware daily-job
59
59
```
60
60
61
61
Now add the labels from above, we'll use a 15 minute timeout.
@@ -70,7 +70,7 @@ provider:
70
70
71
71
functions :
72
72
daily-job :
73
- lang : go
73
+ lang : golang-middleware
74
74
handler : ./daily-job
75
75
image : ttl.sh/daily-job:1h
76
76
labels :
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ The secret *must* be created in the `openfaas-fn` namespace or the equivalent if
115
115
Create a sample function with a `--prefix` variable :
116
116
117
117
` ` ` sh
118
- faas-cli new --lang go private-fn --prefix=registry:port/repo
118
+ faas-cli new --lang golang-middleware private-fn --prefix=registry:port/repo
119
119
` ` `
120
120
121
121
Update the `stack.yml` file and add a reference to the new secret :
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ The YAML file can hold one to many functions separated by separate entries.
21
21
Example:
22
22
23
23
``` bash
24
- $ faas-cli new --lang go fn1
25
- $ faas-cli new --lang go fn2 --append=fn1.yml
24
+ $ faas-cli new --lang golang-middleware fn1
25
+ $ faas-cli new --lang golang-middleware fn2 --append=fn1.yml
26
26
```
27
27
28
28
Produces:
You can’t perform that action at this time.
0 commit comments