You've already forked orderservice
feat(transport): added ability to enable gRPC reflection
This commit is contained in:
@@ -9,8 +9,9 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
GRPCPort int
|
||||
LogLevel string
|
||||
GRPCPort int
|
||||
GRPCEnableReflection bool
|
||||
LogLevel string
|
||||
}
|
||||
|
||||
func Load() (*Config, error) {
|
||||
@@ -27,6 +28,13 @@ func Load() (*Config, error) {
|
||||
}
|
||||
config.GRPCPort = port
|
||||
|
||||
enableReflectionStr := getEnv("GRPC_ENABLE_REFLECTION", "false")
|
||||
enableReflection, err := strconv.ParseBool(enableReflectionStr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
config.GRPCEnableReflection = enableReflection
|
||||
|
||||
config.LogLevel = getEnv("LOG_LEVEL", "info")
|
||||
|
||||
return config, nil
|
||||
|
||||
Reference in New Issue
Block a user