From 32226e4a86ab43763f88e273752bec3fffc5c77d Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Wed, 27 Mar 2024 10:45:59 +0800 Subject: [PATCH] feat: config go.mod --- go.mod | 2 +- go.sum | 4 ++++ pkg/common/config/config.go | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index bca5e95aa..3589daf74 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openimsdk/localcache v0.0.1 github.com/openimsdk/protocol v0.0.58-google - github.com/openimsdk/tools v0.0.47-alpha.3 + github.com/openimsdk/tools v0.0.47-alpha.5 github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.18.0 github.com/sirupsen/logrus v1.9.3 // indirect diff --git a/go.sum b/go.sum index 0ffb0f630..ff81ceecc 100644 --- a/go.sum +++ b/go.sum @@ -274,6 +274,10 @@ github.com/openimsdk/tools v0.0.46-alpha.16 h1:4ouPoTrCuyREF1UPBaka+Oge4x0XsICfN github.com/openimsdk/tools v0.0.46-alpha.16/go.mod h1:hMH6pHDVhOXjA8NQ25P7mOtfRXb5lsPAv/uUDR8342Y= github.com/openimsdk/tools v0.0.46-alpha.16.0.20240322040503-5ee151e04e7d h1:XqhSyp3iHMSzUVRFWpoentayDfteybGHW7wT8WuvVEg= github.com/openimsdk/tools v0.0.46-alpha.16.0.20240322040503-5ee151e04e7d/go.mod h1:Czxh+12vxUMypTIDZBHcTHwYL6o+DGMrC1ZmHqAk/tc= +github.com/openimsdk/tools v0.0.47-alpha.4 h1:18BJ3A7G5gN4DxtVSWuiNH1ZgaTd8blytsBwYOTUGwE= +github.com/openimsdk/tools v0.0.47-alpha.4/go.mod h1:7LNWVXlqHUhTXeETk2ZcBPVzUFIjafHpP5SHh9E+9AY= +github.com/openimsdk/tools v0.0.47-alpha.5 h1:CcLnq0Ne30f9aachsN/LpW1p+C0bzIoIcwen5eCA6to= +github.com/openimsdk/tools v0.0.47-alpha.5/go.mod h1:7LNWVXlqHUhTXeETk2ZcBPVzUFIjafHpP5SHh9E+9AY= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index daf6c6446..46a9f03ea 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -63,6 +63,7 @@ type Zookeeper struct { ZkAddr []string `yaml:"address"` Username string `yaml:"username"` Password string `yaml:"password"` + MaxRetry int `yaml:"maxRetry"` } type Mongo struct { @@ -72,6 +73,7 @@ type Mongo struct { Username string `yaml:"username"` Password string `yaml:"password"` MaxPoolSize int `yaml:"maxPoolSize"` + MaxRetry int `yaml:"maxRetry"` } type Redis struct { @@ -80,6 +82,8 @@ type Redis struct { Username string `yaml:"username"` Password string `yaml:"password"` EnablePipeline bool `yaml:"enablePipeline"` + DB int `yaml:"db"` + MaxRetry int `yaml:"maxRetry"` } type Kafka struct {