global

package
v0.0.0-...-7c5977a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogWriterCleanupKey = "logWriter"
	ZapLoggerCleanupKey = "zapLogger"
	OtelCleanupKey      = "otel"
)
View Source
const (
	LocalDevKey = "LocalDev"
)

Variables

View Source
var (
	Conf   = &conf.AppConf{}
	Logger *zap.SugaredLogger
	// JaegerHttpRT  = otelhttp.NewTransport(http.DefaultTransport)
	Cleanups = make(map[string]func(ctx context.Context) error)
)
View Source
var (
	DefaultCe *redis.Client
)

Redis

View Source
var (
	DefaultDB *gorm.DB
)

Mysql

Functions

func Cleanup

func Cleanup()

func IsDevMode

func IsDevMode() bool

func IsLocalDev

func IsLocalDev() bool

func IsProdMode

func IsProdMode() bool

func SetCleanup

func SetCleanup(name string, fn func(ctx context.Context) error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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