feat 配置
This commit is contained in:
@@ -13,29 +13,29 @@ metric:
|
||||
address: "0.0.0.0"
|
||||
port: 18601
|
||||
jaeger:
|
||||
endpoint: "localhost:4317"
|
||||
endpoint: "127.0.0.1:4317"
|
||||
|
||||
db:
|
||||
etcd:
|
||||
endpoints: [ "localhost:2379" ]
|
||||
endpoints: [ "127.0.0.1:2379" ]
|
||||
mysql:
|
||||
qgdzs_db:
|
||||
dsn: "root:gR9pV4tY7zR6qL3e@tcp(localhost:3306)/qgdzs_db?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
dsn: "root:gR9pV4tY7zR6qL3e@tcp(127.0.0.1:3306)/qgdzs_db?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
maxOpenConn: 50
|
||||
maxIdleConn: 20
|
||||
connMaxLifetimeSec: 600
|
||||
connMaxIdleTimeSec: 180
|
||||
logLevel: "warn"
|
||||
redis:
|
||||
addr: "localhost:6379"
|
||||
addr: "127.0.0.1:6379"
|
||||
password: "lQ7aM8oB6lK0iD5k"
|
||||
db: 0
|
||||
kafka:
|
||||
groupID: "qgdzs"
|
||||
brokers: [ "localhost:9092" ]
|
||||
brokers: [ "127.0.0.1:9092" ]
|
||||
|
||||
serve:
|
||||
grpc:
|
||||
address: "10.0.40.199"
|
||||
address: "127.0.0.1"
|
||||
port: 18600
|
||||
ttl: 20
|
||||
|
||||
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-qgdzs
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260124144615-81e422d3049f
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260125091651-f22d22cbdc57
|
||||
github.com/IBM/sarama v1.46.3
|
||||
github.com/judwhite/go-svc v1.2.1
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,7 +1,7 @@
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260124144615-81e422d3049f h1:ZJGMfG3MD5Oll7aFZ5HIXID8snSIea0qPcjMI8kFLg0=
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260124144615-81e422d3049f/go.mod h1:mMhZcumphj6gaVTppVYsMTkd+5HupmQgAc53Pd4MH9I=
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260125091651-f22d22cbdc57 h1:u+BKY8YAm1gA9EL3Tw3KfzKRmZ3TgBMkFQurltLl438=
|
||||
git.hlsq.asia/mmorpg/service-common v0.0.0-20260125091651-f22d22cbdc57/go.mod h1:mMhZcumphj6gaVTppVYsMTkd+5HupmQgAc53Pd4MH9I=
|
||||
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
||||
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/IBM/sarama v1.46.3 h1:njRsX6jNlnR+ClJ8XmkO+CM4unbrNr/2vB5KK6UA+IE=
|
||||
|
||||
@@ -67,7 +67,7 @@ func (s *Server) GenerateQuestion(ctx context.Context, req *grpc_pb.GenerateQues
|
||||
RequestAI(
|
||||
[]string{
|
||||
fmt.Sprintf(prompt[0], time.Now().Format("2006-01-02 15:04:05"), category),
|
||||
fmt.Sprintf(prompt[1], req.Num, req.Category),
|
||||
fmt.Sprintf(prompt[1], req.Num),
|
||||
fmt.Sprintf(prompt[2], req.Num),
|
||||
fmt.Sprintf(prompt[3], req.Num),
|
||||
fmt.Sprintf(prompt[4], req.Num),
|
||||
|
||||
Reference in New Issue
Block a user