Documentation
¶
Index ¶
- func CliLogErrorw(ctx context.Context, message string, keysAndValues ...interface{})
- func CliLogInfow(ctx context.Context, message string, keysAndValues ...interface{})
- func CliLogWarnw(ctx context.Context, message string, keysAndValues ...interface{})
- 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 WithExistingLogger(ctx context.Context, logger *zap.SugaredLogger) 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 CliLogErrorw ¶
func CliLogErrorw(ctx context.Context, message string, keysAndValues ...interface{})
func CliLogInfow ¶
func CliLogInfow(ctx context.Context, message string, keysAndValues ...interface{})
func CliLogWarnw ¶
func CliLogWarnw(ctx context.Context, message string, keysAndValues ...interface{})
func GetLogLevel ¶
func GetLogLevel() zapcore.Level
func LoggerFrom ¶
func LoggerFrom(ctx context.Context) *zap.SugaredLogger
func SetFallbackLogger ¶
func SetFallbackLogger(logger *zap.SugaredLogger)
func SetLogLevel ¶
func SetLogLevel(l zapcore.Level)
func SilenceLogger ¶
func SilenceLogger(ctx context.Context) context.Context
func WithErrorHandler ¶
func WithErrorHandler(ctx context.Context, errorHandler ErrorHandler) context.Context
func WithExistingLogger ¶ added in v0.13.3
func WithExistingLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context
func WithLogger ¶
func WithLogger(ctx context.Context, name string) context.Context
func WithLoggerValues ¶
func WithLoggerValues(ctx context.Context, meta ...interface{}) context.Context
Types ¶
type Backoff ¶
type Backoff interface {
Backoff(ctx context.Context, f func(ctx context.Context) error) error
}
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
}
type ExponentioalBackoff ¶
type ExponentioalBackoff struct {
MaxRetries uint
MaxDuration *time.Duration
MaxDelay *time.Duration
}
Click to show internal directories.
Click to hide internal directories.