feat(transport): added ability to enable gRPC reflection

This commit is contained in:
ITQ
2025-10-27 22:35:53 +03:00
parent db44030c9f
commit 21935804f9
4 changed files with 20 additions and 4 deletions
+10 -2
View File
@@ -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