global

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tracer trace.Tracer = tracenoop.NewTracerProvider().Tracer(serviceName)
	Meter  metric.Meter = metricnoop.NewMeterProvider().Meter(serviceName)
)
View Source
var Config = config.New() // Default so it avoids nil-pointer dereference on root-level errors
View Source
var (
	Version = "dev"
)

Functions

func GetExecutor

func GetExecutor() *executor.Executor

func GetMetrics

func GetMetrics() *monitoring.Metrics

func GetNatsManager

func GetNatsManager() *nats.Manager

func GetPgSQLManager

func GetPgSQLManager() *pgsql.Manager

func InitExecutor

func InitExecutor(ctx context.Context) (_ error)

func InitMetrics

func InitMetrics() (err error)

func InitNatsManager

func InitNatsManager(ctx context.Context) (err error)

func InitPostgreSQL

func InitPostgreSQL() (err error)

func OperationNameFromContext

func OperationNameFromContext(ctx context.Context) string

func SetupOTelSDK

func SetupOTelSDK(ctx context.Context) (shutdown func(context.Context) error, err error)

SetupOTelSDK configures the OpenTelemetry signals exporters.

func WithOperationName

func WithOperationName(ctx context.Context, opName string) context.Context

Types

type Logger

type Logger struct {
	Sub *zap.Logger
}

func Log

func Log() *Logger

func (*Logger) Debug

func (log *Logger) Debug(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Error

func (log *Logger) Error(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Info

func (log *Logger) Info(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Warn

func (log *Logger) Warn(ctx context.Context, msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL