From a3eef735ac6a8b9b566c5c0a3933dcedf9f8d677 Mon Sep 17 00:00:00 2001 From: rogerogers Date: Tue, 23 Apr 2024 21:37:42 +0800 Subject: [PATCH] chore: adjust port Signed-off-by: rogerogers --- gomall/app/checkout/conf/dev/conf.yaml | 4 ++-- gomall/app/checkout/conf/online/conf.yaml | 4 ++-- gomall/app/checkout/conf/test/conf.yaml | 4 ++-- gomall/app/email/.env.example | 5 +++++ gomall/app/email/conf/dev/conf.yaml | 2 +- gomall/app/email/conf/online/conf.yaml | 2 +- gomall/app/email/conf/test/conf.yaml | 4 ++-- gomall/app/email/main.go | 2 ++ gomall/app/order/conf/dev/conf.yaml | 4 ++-- gomall/app/order/conf/online/conf.yaml | 4 ++-- gomall/app/order/conf/test/conf.yaml | 4 ++-- gomall/app/payment/conf/dev/conf.yaml | 4 ++-- gomall/app/payment/conf/online/conf.yaml | 4 ++-- gomall/app/payment/conf/test/conf.yaml | 4 ++-- gomall/app/product/conf/dev/conf.yaml | 4 ++-- gomall/app/product/conf/online/conf.yaml | 4 ++-- gomall/app/product/conf/test/conf.yaml | 4 ++-- gomall/app/user/conf/dev/conf.yaml | 4 ++-- gomall/app/user/conf/online/conf.yaml | 4 ++-- gomall/app/user/conf/test/conf.yaml | 4 ++-- gomall/app/user/go.mod | 14 +++++++------- 21 files changed, 48 insertions(+), 41 deletions(-) create mode 100644 gomall/app/email/.env.example diff --git a/gomall/app/checkout/conf/dev/conf.yaml b/gomall/app/checkout/conf/dev/conf.yaml index d05e8962..88a0fe51 100644 --- a/gomall/app/checkout/conf/dev/conf.yaml +++ b/gomall/app/checkout/conf/dev/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "checkout" - address: ":8884" - metrics_port: ":9994" + address: ":8885" + metrics_port: ":9995" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/checkout/conf/online/conf.yaml b/gomall/app/checkout/conf/online/conf.yaml index d05e8962..88a0fe51 100644 --- a/gomall/app/checkout/conf/online/conf.yaml +++ b/gomall/app/checkout/conf/online/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "checkout" - address: ":8884" - metrics_port: ":9994" + address: ":8885" + metrics_port: ":9995" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/checkout/conf/test/conf.yaml b/gomall/app/checkout/conf/test/conf.yaml index d05e8962..88a0fe51 100644 --- a/gomall/app/checkout/conf/test/conf.yaml +++ b/gomall/app/checkout/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "checkout" - address: ":8884" - metrics_port: ":9994" + address: ":8885" + metrics_port: ":9995" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/email/.env.example b/gomall/app/email/.env.example new file mode 100644 index 00000000..7578bac4 --- /dev/null +++ b/gomall/app/email/.env.example @@ -0,0 +1,5 @@ +MYSQL_USER=root +MYSQL_PASSWORD=root +MYSQL_HOST=127.0.0.1 +OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:4317 +OTEL_EXPORTER_OTLP_INSECURE=true \ No newline at end of file diff --git a/gomall/app/email/conf/dev/conf.yaml b/gomall/app/email/conf/dev/conf.yaml index 00cc12a9..1547eb4b 100644 --- a/gomall/app/email/conf/dev/conf.yaml +++ b/gomall/app/email/conf/dev/conf.yaml @@ -1,6 +1,6 @@ kitex: service: "email" - address: ":8888" + address: ":8887" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/email/conf/online/conf.yaml b/gomall/app/email/conf/online/conf.yaml index 00cc12a9..1547eb4b 100644 --- a/gomall/app/email/conf/online/conf.yaml +++ b/gomall/app/email/conf/online/conf.yaml @@ -1,6 +1,6 @@ kitex: service: "email" - address: ":8888" + address: ":8887" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/email/conf/test/conf.yaml b/gomall/app/email/conf/test/conf.yaml index 818f8aff..b6a2825e 100644 --- a/gomall/app/email/conf/test/conf.yaml +++ b/gomall/app/email/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "email" - address: ":8888" - metrics_port: ":9998" + address: ":8887" + metrics_port: ":9997" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/email/main.go b/gomall/app/email/main.go index 660cf54c..f102129e 100644 --- a/gomall/app/email/main.go +++ b/gomall/app/email/main.go @@ -18,6 +18,7 @@ import ( "net" "strings" + "github.com/joho/godotenv" "gopkg.in/natefinch/lumberjack.v2" "github.com/cloudwego/biz-demo/gomall/app/email/biz/consumer" @@ -35,6 +36,7 @@ import ( var serviceName = conf.GetConf().Kitex.Service func main() { + _ = godotenv.Load() opts := kitexInit() mtl.InitLog(&lumberjack.Logger{ diff --git a/gomall/app/order/conf/dev/conf.yaml b/gomall/app/order/conf/dev/conf.yaml index 4229d901..c0e5e505 100644 --- a/gomall/app/order/conf/dev/conf.yaml +++ b/gomall/app/order/conf/dev/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "order" - address: ":8885" - metrics_port: ":9995" + address: ":8886" + metrics_port: ":9996" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/order/conf/online/conf.yaml b/gomall/app/order/conf/online/conf.yaml index 4229d901..c0e5e505 100644 --- a/gomall/app/order/conf/online/conf.yaml +++ b/gomall/app/order/conf/online/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "order" - address: ":8885" - metrics_port: ":9995" + address: ":8886" + metrics_port: ":9996" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/order/conf/test/conf.yaml b/gomall/app/order/conf/test/conf.yaml index 4229d901..c0e5e505 100644 --- a/gomall/app/order/conf/test/conf.yaml +++ b/gomall/app/order/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "order" - address: ":8885" - metrics_port: ":9995" + address: ":8886" + metrics_port: ":9996" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/payment/conf/dev/conf.yaml b/gomall/app/payment/conf/dev/conf.yaml index 185a723f..03111a8b 100644 --- a/gomall/app/payment/conf/dev/conf.yaml +++ b/gomall/app/payment/conf/dev/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "payment" - address: ":8886" - metrics_port: ":9996" + address: ":8884" + metrics_port: ":9994" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/payment/conf/online/conf.yaml b/gomall/app/payment/conf/online/conf.yaml index 185a723f..03111a8b 100644 --- a/gomall/app/payment/conf/online/conf.yaml +++ b/gomall/app/payment/conf/online/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "payment" - address: ":8886" - metrics_port: ":9996" + address: ":8884" + metrics_port: ":9994" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/payment/conf/test/conf.yaml b/gomall/app/payment/conf/test/conf.yaml index da961a26..08d5bea5 100644 --- a/gomall/app/payment/conf/test/conf.yaml +++ b/gomall/app/payment/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "payment" - address: ":8886" - metrics_port: ":9996" + address: ":8884" + metrics_port: ":9994" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/product/conf/dev/conf.yaml b/gomall/app/product/conf/dev/conf.yaml index c7a0685f..b2d3e094 100644 --- a/gomall/app/product/conf/dev/conf.yaml +++ b/gomall/app/product/conf/dev/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "product" - address: ":8881" - metrics_port: ":9991" + address: ":8882" + metrics_port: ":9992" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/product/conf/online/conf.yaml b/gomall/app/product/conf/online/conf.yaml index c7a0685f..b2d3e094 100644 --- a/gomall/app/product/conf/online/conf.yaml +++ b/gomall/app/product/conf/online/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "product" - address: ":8881" - metrics_port: ":9991" + address: ":8882" + metrics_port: ":9992" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/product/conf/test/conf.yaml b/gomall/app/product/conf/test/conf.yaml index 33f39de5..9df4b9e0 100644 --- a/gomall/app/product/conf/test/conf.yaml +++ b/gomall/app/product/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "product" - address: ":8881" - metrics_port: ":9991" + address: ":8882" + metrics_port: ":9992" log_level: debug log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/user/conf/dev/conf.yaml b/gomall/app/user/conf/dev/conf.yaml index aa39e445..eb770062 100644 --- a/gomall/app/user/conf/dev/conf.yaml +++ b/gomall/app/user/conf/dev/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "user" - address: ":8882" - metrics_port: ":9992" + address: ":8881" + metrics_port: ":9991" log_level: debug log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/user/conf/online/conf.yaml b/gomall/app/user/conf/online/conf.yaml index 4eb1d150..841237c6 100644 --- a/gomall/app/user/conf/online/conf.yaml +++ b/gomall/app/user/conf/online/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "user" - address: ":8882" - metrics_port: ":9992" + address: ":8881" + metrics_port: ":9991" log_level: info log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/user/conf/test/conf.yaml b/gomall/app/user/conf/test/conf.yaml index aa39e445..eb770062 100644 --- a/gomall/app/user/conf/test/conf.yaml +++ b/gomall/app/user/conf/test/conf.yaml @@ -1,7 +1,7 @@ kitex: service: "user" - address: ":8882" - metrics_port: ":9992" + address: ":8881" + metrics_port: ":9991" log_level: debug log_file_name: "log/kitex.log" log_max_size: 10 diff --git a/gomall/app/user/go.mod b/gomall/app/user/go.mod index 099ffd75..d38af968 100644 --- a/gomall/app/user/go.mod +++ b/gomall/app/user/go.mod @@ -13,15 +13,8 @@ require ( github.com/cloudwego/biz-demo/gomall/rpc_gen v0.0.0-00010101000000-000000000000 github.com/cloudwego/kitex v0.8.0 github.com/joho/godotenv v1.5.1 - github.com/kitex-contrib/obs-opentelemetry/logging/zap v0.0.0-20240305123358-828863cc5853 - github.com/kitex-contrib/registry-consul v0.0.0-20230406075225-7d341f036654 github.com/kr/pretty v0.3.1 - github.com/prometheus/client_golang v1.19.0 github.com/redis/go-redis/v9 v9.3.1 - go.opentelemetry.io/otel v1.25.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 - go.opentelemetry.io/otel/sdk v1.25.0 - go.uber.org/zap v1.27.0 golang.org/x/crypto v0.21.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/validator.v2 v2.0.1 @@ -77,6 +70,8 @@ require ( github.com/kitex-contrib/config-consul v0.1.2 // indirect github.com/kitex-contrib/monitor-prometheus v0.2.0 // indirect github.com/kitex-contrib/obs-opentelemetry v0.2.6 // indirect + github.com/kitex-contrib/obs-opentelemetry/logging/zap v0.0.0-20240305123358-828863cc5853 // indirect + github.com/kitex-contrib/registry-consul v0.0.0-20230406075225-7d341f036654 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -88,6 +83,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/oleiade/lane v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect @@ -100,14 +96,18 @@ require ( go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect go.opentelemetry.io/contrib/propagators/ot v1.20.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.6.0 // indirect golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect golang.org/x/net v0.23.0 // indirect