init
This commit is contained in:
18
config/config.go
Normal file
18
config/config.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
var RpcConfig = &Config{}
|
||||
|
||||
type Config struct {
|
||||
RegistryServer []string
|
||||
BeforeHandel func(ctx context.Context, baseName, serviceName, serviceMethod string, args interface{}, reply interface{}) (context.Context, error)
|
||||
AfterHandel func(ctx context.Context, baseName, serviceName, serviceMethod string, args interface{}, reply interface{}, err error) error
|
||||
}
|
||||
|
||||
// InitConfig @Title 初始化配置
|
||||
func InitConfig(config Config) {
|
||||
RpcConfig = &config
|
||||
}
|
||||
Reference in New Issue
Block a user