improve grpc lifecycle

This commit is contained in:
2025-03-07 17:04:46 -05:00
parent c5da5f7887
commit e178956eef
3 changed files with 30 additions and 5 deletions

View File

@ -22,3 +22,24 @@ type AppConfig struct {
OTEL *OTELConfig `yaml:"otel,omitempty"`
GRPC *GRPCConfig `yaml:"grpc,omitempty"`
}
func (ac *AppConfig) HTTPEnabled() bool {
if ac.HTTP != nil && ac.HTTP.Enabled {
return true
}
return false
}
func (ac *AppConfig) GRPCEnabled() bool {
if ac.GRPC != nil && ac.GRPC.Enabled {
return true
}
return false
}
func (ac *AppConfig) OTELEnabled() bool {
if ac.OTEL != nil && ac.OTEL.Enabled {
return true
}
return false
}