Documentation
¶
Overview ¶
Package internalv2compat is an INTERNAL ONLY library provided for transitional projects that need to use baseplate v2 and v0 in the same module.
DO NOT USE THIS LIBRARY DIRECTLY. Breaking changes may be made to this package at any time.
Deprecated: This is an internal library and should not be used directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GlobalRegistry = prometheus.WrapRegistererWith(prometheus.Labels{ "baseplate_go": "v0", }, prometheus.DefaultRegisterer)
GlobalRegistry should be used to register all metrics from baseplate Go v0 to ensure they do not conflict with metrics from baseplate Go v2 libraries which will have the same name.
Functions ¶
func GlobalLogger ¶
func GlobalLogger() *zap.SugaredLogger
GlobalLogger is an inlineable accessor for the global logger to allow for injection from baseplate v2.
func OverrideLogger ¶
func OverrideLogger(logger *zap.SugaredLogger)
OverrideLogger allows baseplate v2 to override the global logger irrevocably.
func SetGlobalLogger ¶
func SetGlobalLogger(logger *zap.SugaredLogger)
SetGlobalLogger allows baseplate v0 to set the global logger.