improve grpc lifecycle
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user