Skip to content

Commit

Permalink
[SERVER] fix bash syntax of register service functions
Browse files Browse the repository at this point in the history
  • Loading branch information
huynhthanhbinh committed Apr 13, 2020
1 parent 0195e62 commit a92a13b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gateway/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ KONG_ADMIN_HOST=localhost
KONG_ADMIN_PORT=8001
CONNECT_TIMEOUT=10000

function registerService () {
printf "\n\nRegister %s service\n" $1
registerService () {
printf "\nRegister %s service\n" $1
curl -XPOST ${KONG_ADMIN_HOST}:${KONG_ADMIN_PORT}/services \
--data name=$1 \
--data protocol=grpc \
Expand All @@ -13,14 +13,16 @@ function registerService () {
--data connect_timeout=$4 \
--data write_timeout=$4 \
--data read_timeout=$4
printf "\n"
}

function registerServiceRoutes () {
printf "\n\nRegister %s service routes\n" $1
registerServiceRoutes () {
printf "\nRegister %s service routes\n" $1
curl -XPOST ${KONG_ADMIN_HOST}:${KONG_ADMIN_PORT}/services/$1/routes \
--data protocols=grpc \
--data name=catch-all-$1-services \
--data paths=$2
printf "\n"
}

SERVICE_NAME=user
Expand Down

0 comments on commit a92a13b

Please sign in to comment.