Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package config
|
||||
|
||||
// Default Settings
|
||||
// DefaultConfig provides a default application configuration.
|
||||
var DefaultConfig = &AppConfig{
|
||||
Environment: "development",
|
||||
Version: getVersion(),
|
||||
@@ -23,6 +23,7 @@ type AppConfig struct {
|
||||
GRPC *GRPCConfig `yaml:"grpc,omitempty" json:"grpc,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPEnabled returns true if HTTP is enabled in the AppConfig.
|
||||
func (ac *AppConfig) HTTPEnabled() bool {
|
||||
if ac.HTTP != nil && ac.HTTP.Enabled {
|
||||
return true
|
||||
@@ -30,6 +31,7 @@ func (ac *AppConfig) HTTPEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// GRPCEnabled returns true if gRPC is enabled in the AppConfig.
|
||||
func (ac *AppConfig) GRPCEnabled() bool {
|
||||
if ac.GRPC != nil && ac.GRPC.Enabled {
|
||||
return true
|
||||
@@ -37,6 +39,7 @@ func (ac *AppConfig) GRPCEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// OTELEnabled returns true if OpenTelemetry is enabled in the AppConfig.
|
||||
func (ac *AppConfig) OTELEnabled() bool {
|
||||
if ac.OTEL != nil && ac.OTEL.Enabled {
|
||||
return true
|
||||
|
Reference in New Issue
Block a user