Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.

This commit is contained in:
2025-08-13 16:01:51 -04:00
parent 31fc6dca16
commit 318115690d
16 changed files with 50 additions and 23 deletions

View File

@@ -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