feat: config (#2934)

This commit is contained in:
icey-yu
2024-12-07 12:11:12 +08:00
committed by GitHub
parent fceaaa199b
commit bbbf17cbe4
30 changed files with 85 additions and 103 deletions
+8 -9
View File
@@ -372,10 +372,9 @@ type AfterConfig struct {
}
type Share struct {
Secret string `mapstructure:"secret"`
RpcRegisterName RpcRegisterName `mapstructure:"rpcRegisterName"`
IMAdminUserID []string `mapstructure:"imAdminUserID"`
MultiLogin MultiLogin `mapstructure:"multiLogin"`
Secret string `mapstructure:"secret"`
IMAdminUserID []string `mapstructure:"imAdminUserID"`
MultiLogin MultiLogin `mapstructure:"multiLogin"`
}
type MultiLogin struct {
@@ -383,7 +382,7 @@ type MultiLogin struct {
MaxNumOneEnd int `mapstructure:"maxNumOneEnd"`
}
type RpcRegisterName struct {
type RpcService struct {
User string `mapstructure:"user"`
Friend string `mapstructure:"friend"`
Msg string `mapstructure:"msg"`
@@ -395,7 +394,7 @@ type RpcRegisterName struct {
Third string `mapstructure:"third"`
}
func (r *RpcRegisterName) GetServiceNames() []string {
func (r *RpcService) GetServiceNames() []string {
return []string{
r.User,
r.Friend,
@@ -470,9 +469,9 @@ type ZooKeeper struct {
}
type Discovery struct {
Enable string `mapstructure:"enable"`
Etcd Etcd `mapstructure:"etcd"`
ZooKeeper ZooKeeper `mapstructure:"zooKeeper"`
Enable string `mapstructure:"enable"`
Etcd Etcd `mapstructure:"etcd"`
RpcService RpcService `mapstructure:"rpcService"`
}
type Etcd struct {