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 ¶
- func GlobalLogger() *zap.SugaredLogger
- func OverrideLogger(logger *zap.SugaredLogger)
- func SetGlobalLogger(logger *zap.SugaredLogger)
- func SetV2TracingEnabled(enabled bool)
- func SetV2TracingHTTPClientMiddleware(middleware func(base http.RoundTripper) http.RoundTripper)
- func SetV2TracingHTTPServerMiddleware(middleware func(name string, next http.Handler) http.Handler)
- func SetV2TracingThriftClientMiddleware(middleware thrift.ClientMiddleware)
- func SetV2TracingThriftClientMiddlewareProvider(provider ThriftClientTraceMiddlewareProvider)
- func SetV2TracingThriftServerMiddleware(middleware thrift.ProcessorMiddleware)
- func V2TracingEnabled() bool
- func V2TracingHTTPClientMiddleware() func(base http.RoundTripper) http.RoundTripper
- func V2TracingHTTPServerMiddleware() func(name string, next http.Handler) http.Handler
- func V2TracingThriftClientMiddleware() thrift.ClientMiddleware
- func V2TracingThriftClientMiddlewareWithArgs(args ClientTraceMiddlewareArgs) thrift.ClientMiddleware
- func V2TracingThriftServerMiddleware() thrift.ProcessorMiddleware
- type ClientTraceMiddlewareArgs
- type IsHTTP
- type IsThrift
- type ThriftClientTraceMiddlewareProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.
func SetV2TracingEnabled ¶ added in v0.9.15
func SetV2TracingEnabled(enabled bool)
func SetV2TracingHTTPClientMiddleware ¶ added in v0.9.16
func SetV2TracingHTTPClientMiddleware(middleware func(base http.RoundTripper) http.RoundTripper)
func SetV2TracingHTTPServerMiddleware ¶ added in v0.9.16
func SetV2TracingThriftClientMiddleware ¶ added in v0.9.16
func SetV2TracingThriftClientMiddleware(middleware thrift.ClientMiddleware)
func SetV2TracingThriftClientMiddlewareProvider ¶ added in v0.10.0
func SetV2TracingThriftClientMiddlewareProvider(provider ThriftClientTraceMiddlewareProvider)
func SetV2TracingThriftServerMiddleware ¶ added in v0.9.16
func SetV2TracingThriftServerMiddleware(middleware thrift.ProcessorMiddleware)
func V2TracingEnabled ¶ added in v0.9.15
func V2TracingEnabled() bool
func V2TracingHTTPClientMiddleware ¶ added in v0.9.16
func V2TracingHTTPClientMiddleware() func(base http.RoundTripper) http.RoundTripper
func V2TracingHTTPServerMiddleware ¶ added in v0.9.16
func V2TracingThriftClientMiddleware ¶ added in v0.9.16
func V2TracingThriftClientMiddleware() thrift.ClientMiddleware
func V2TracingThriftClientMiddlewareWithArgs ¶ added in v0.10.0
func V2TracingThriftClientMiddlewareWithArgs(args ClientTraceMiddlewareArgs) thrift.ClientMiddleware
func V2TracingThriftServerMiddleware ¶ added in v0.9.16
func V2TracingThriftServerMiddleware() thrift.ProcessorMiddleware
Types ¶
type ClientTraceMiddlewareArgs ¶ added in v0.10.0
type ClientTraceMiddlewareArgs struct {
ServiceName string
}
ClientTraceMiddlewareArgs is the arguments used to instantiate client tracing middleware
This struct is exported so that it can be used by baseplate V2 interop utilities.
type IsHTTP ¶
type IsHTTP interface {
// contains filtered or unexported methods
}
IsHTTP allows detecting the unexported httpbp.server without resorting to reflection.
type IsThrift ¶
type IsThrift interface {
// contains filtered or unexported methods
}
IsThrift allows detecting the unexported thriftbp.server without resorting to reflection.
type ThriftClientTraceMiddlewareProvider ¶ added in v0.10.0
type ThriftClientTraceMiddlewareProvider func(args ClientTraceMiddlewareArgs) thrift.ClientMiddleware