Documentation
¶
Index ¶
- func GetLogLevel() zapcore.Level
- func LoggerFrom(ctx context.Context) *zap.SugaredLogger
- func SetFallbackLogger(logger *zap.SugaredLogger)
- func SetLogLevel(l zapcore.Level)
- func SilenceLogger(ctx context.Context) context.Context
- func Sleep(ctx context.Context, amount time.Duration) error
- func WithErrorHandler(ctx context.Context, errorHandler ErrorHandler) context.Context
- func WithLogger(ctx context.Context, name string) context.Context
- func WithLoggerValues(ctx context.Context, meta ...interface{}) context.Context
- type Backoff
- type ErrorHandler
- type ErrorLogger
- type ExponentioalBackoff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogLevel ¶
func LoggerFrom ¶
func LoggerFrom(ctx context.Context) *zap.SugaredLogger
func SetFallbackLogger ¶
func SetFallbackLogger(logger *zap.SugaredLogger)
func SetLogLevel ¶
func WithErrorHandler ¶
func WithErrorHandler(ctx context.Context, errorHandler ErrorHandler) context.Context
Types ¶
type Backoff ¶
func NewExponentioalBackoff ¶
func NewExponentioalBackoff(eb ExponentioalBackoff) Backoff
type ErrorHandler ¶
type ErrorHandler interface {
HandleErr(error)
}
func ErrorHandlerFrom ¶
func ErrorHandlerFrom(ctx context.Context) ErrorHandler
type ErrorLogger ¶
type ErrorLogger struct {
// contains filtered or unexported fields
}
func (*ErrorLogger) HandleErr ¶
func (h *ErrorLogger) HandleErr(err error)
Click to show internal directories.
Click to hide internal directories.