Skip to content

Commit e11b5df

Browse files
committed
Update readme with golang echo function
Signed-off-by: Alex Ellis <[email protected]>
1 parent 7a17a94 commit e11b5df

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ go run main.go -vcenter-url="http://user:[email protected]:8989/sdk" -insecure
2828
Deploy an echo function that subscribes to the event of "vm.powered.on"
2929

3030
```bash
31-
faas-cli deploy --annotation topic="vm.powered.on" --fprocess=/bin/cat -e write_debug=true --image=functions/alpine:latest --name vmware
31+
export OPENFAAS_URL=http://127.0.0.1:31112
32+
33+
git clone https://github.com/alexellis/echo-fn
34+
cd echo-fn
35+
faas-cli deploy
36+
```
37+
38+
The `stack.yml` contains an annotation of `topic=vm.powered.on`, to change this edit the file and run `faas-cli deploy`. To edit the code in the handler change the code and `image` field then run `faas-cli up`
3239
```
3340
3441
* Generate some events:
@@ -37,11 +44,16 @@ faas-cli deploy --annotation topic="vm.powered.on" --fprocess=/bin/cat -e write_
3744
GOVC_INSECURE=true GOVC_URL=http://user:[email protected]:8989/sdk govc vm.power -off '*'
3845
```
3946
40-
* Check the logs of the vmware function
47+
* Check the logs of the `echo-fn` function
4148
42-
```
43-
kubectl logs -n openfaas-fn deploy/vmware
44-
docker service logs vmware
49+
```bash
50+
# on Kubernetes
51+
52+
kubectl logs -n openfaas-fn deploy/echo-fn
53+
54+
# or on Swarm
55+
56+
docker service logs echo-fn
4557
```
4658

4759
## License

0 commit comments

Comments
 (0)