From ea182d5610a911b1d3021e73b760a795682f6d26 Mon Sep 17 00:00:00 2001 From: MD Ashique Date: Thu, 9 Mar 2023 16:13:21 +0530 Subject: [PATCH] assigning unique ports each app under go lang Signed-off-by: MD Ashique --- bindings/go/sdk/README.md | 2 +- bindings/go/sdk/batch/app.go | 2 +- pub_sub/go/sdk/README.md | 2 +- pub_sub/go/sdk/order-processor/app.go | 2 +- service_invocation/go/http/README.md | 2 +- service_invocation/go/http/dapr.yaml | 2 +- service_invocation/go/http/order-processor/app.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bindings/go/sdk/README.md b/bindings/go/sdk/README.md index 6f04cb91..b65bbfec 100644 --- a/bindings/go/sdk/README.md +++ b/bindings/go/sdk/README.md @@ -60,7 +60,7 @@ timeout_seconds: 30 --> ```bash -dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run . +dapr run --app-id batch-sdk --app-port 6004 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run . ``` diff --git a/bindings/go/sdk/batch/app.go b/bindings/go/sdk/batch/app.go index 548b659f..cd7ce927 100644 --- a/bindings/go/sdk/batch/app.go +++ b/bindings/go/sdk/batch/app.go @@ -105,7 +105,7 @@ func main() { var appPort string var okHost bool if appPort, okHost = os.LookupEnv("APP_PORT"); !okHost { - appPort = "6002" + appPort = "6004" } r := mux.NewRouter() diff --git a/pub_sub/go/sdk/README.md b/pub_sub/go/sdk/README.md index 14604e6f..5b4f22ef 100644 --- a/pub_sub/go/sdk/README.md +++ b/pub_sub/go/sdk/README.md @@ -27,7 +27,7 @@ sleep: 15 ```bash cd ./order-processor -dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run . +dapr run --app-port 6005 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run . ``` diff --git a/pub_sub/go/sdk/order-processor/app.go b/pub_sub/go/sdk/order-processor/app.go index 892160c7..69df1d2b 100644 --- a/pub_sub/go/sdk/order-processor/app.go +++ b/pub_sub/go/sdk/order-processor/app.go @@ -20,7 +20,7 @@ var sub = &common.Subscription{ func main() { appPort := os.Getenv("APP_PORT") if appPort == "" { - appPort = "6002" + appPort = "6005" } // Create the new server on appPort and add a topic listener diff --git a/service_invocation/go/http/README.md b/service_invocation/go/http/README.md index 4d0eb053..7cd9a4bb 100644 --- a/service_invocation/go/http/README.md +++ b/service_invocation/go/http/README.md @@ -26,7 +26,7 @@ sleep: 15 ```bash cd ./order-processor dapr run \ - --app-port 6001 \ + --app-port 6006 \ --app-id order-processor \ --app-protocol http \ --dapr-http-port 3501 \ diff --git a/service_invocation/go/http/dapr.yaml b/service_invocation/go/http/dapr.yaml index 5c4a371c..f28688cd 100644 --- a/service_invocation/go/http/dapr.yaml +++ b/service_invocation/go/http/dapr.yaml @@ -2,7 +2,7 @@ version: 1 apps: - appDirPath: ./order-processor/ appID: order-processor - appPort: 6001 + appPort: 6006 command: ["go", "run", "."] - appID: checkout appDirPath: ./checkout/ diff --git a/service_invocation/go/http/order-processor/app.go b/service_invocation/go/http/order-processor/app.go index 07398520..2da385e8 100644 --- a/service_invocation/go/http/order-processor/app.go +++ b/service_invocation/go/http/order-processor/app.go @@ -28,7 +28,7 @@ func main() { // Start the server listening on port 6001 // This is a blocking call - err := http.ListenAndServe(":6001", r) + err := http.ListenAndServe(":6006", r) if err != http.ErrServerClosed { log.Println("Error starting HTTP server") }