Move hello-async.sh and hello-sync.sh to the ruby and go directories … (#176)

* Move hello-async.sh and hello-sync.sh to the ruby and go directories and get rid of examples in tools

* update hello-ruby code to use iron/hello:ruby images
This commit is contained in:
Seif Lotfy سيف لطفي
2016-10-17 22:12:10 +02:00
committed by GitHub
parent 0270eca460
commit 7ec037b46a
8 changed files with 46 additions and 21 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"type": "async",
"path":"/hello-async",
"image":"iron/hello"
}
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-async
done;

23
examples/hello-go/hello-sync.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"type": "sync",
"path":"/hello-sync",
"image":"iron/hello"
}
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-sync
done;

View File

@@ -0,0 +1,23 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"type": "async",
"path":"/hello-async",
"image":"iron/hello:ruby"
}
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-async
done;

View File

@@ -0,0 +1,23 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"type": "sync",
"path":"/hello-sync",
"image":"iron/hello:ruby
}
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-sync
done;