Documentation
ΒΆ
Index ΒΆ
- func Either(handlers ...slog.Handler) slog.Handler
- func NewMultiHandler(handlers ...slog.Handler) slog.Handler
- type EitherHandler
- type EnabledInlineMiddleware
- func (h *EnabledInlineMiddleware) Enabled(ctx context.Context, level slog.Level) bool
- func (h *EnabledInlineMiddleware) Handle(ctx context.Context, record slog.Record) error
- func (h *EnabledInlineMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *EnabledInlineMiddleware) WithGroup(name string) slog.Handler
- type HandleInlineMiddleware
- func (h *HandleInlineMiddleware) Enabled(ctx context.Context, level slog.Level) bool
- func (h *HandleInlineMiddleware) Handle(ctx context.Context, record slog.Record) error
- func (h *HandleInlineMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *HandleInlineMiddleware) WithGroup(name string) slog.Handler
- type InlineMiddleware
- type Middleware
- func NewEnabledInlineMiddleware(enabledFunc func(ctx context.Context, level slog.Level, ...) bool) Middleware
- func NewHandleInlineMiddleware(handleFunc func(ctx context.Context, record slog.Record, ...) error) Middleware
- func NewInlineMiddleware(enabledFunc func(ctx context.Context, level slog.Level, ...) bool, ...) Middleware
- func NewWithAttrsInlineMiddleware(...) Middleware
- func NewWithGroupInlineMiddleware(withGroupFunc func(name string, next func(string) slog.Handler) slog.Handler) Middleware
- type MultiHandler
- type PipeBuilder
- type WithAttrsInlineMiddleware
- func (h *WithAttrsInlineMiddleware) Enabled(ctx context.Context, level slog.Level) bool
- func (h *WithAttrsInlineMiddleware) Handle(ctx context.Context, record slog.Record) error
- func (h *WithAttrsInlineMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *WithAttrsInlineMiddleware) WithGroup(name string) slog.Handler
- type WithGroupInlineMiddleware
- func (h *WithGroupInlineMiddleware) Enabled(ctx context.Context, level slog.Level) bool
- func (h *WithGroupInlineMiddleware) Handle(ctx context.Context, record slog.Record) error
- func (h *WithGroupInlineMiddleware) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *WithGroupInlineMiddleware) WithGroup(name string) slog.Handler
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
Types ΒΆ
type EitherHandler ΒΆ added in v0.2.0
type EitherHandler struct {
// contains filtered or unexported fields
}
@TODO: implement round robin strategy ?
type EnabledInlineMiddleware ΒΆ
type EnabledInlineMiddleware struct {
// contains filtered or unexported fields
}
type HandleInlineMiddleware ΒΆ
type HandleInlineMiddleware struct {
// contains filtered or unexported fields
}
type InlineMiddleware ΒΆ
type InlineMiddleware struct {
// contains filtered or unexported fields
}
type Middleware ΒΆ
func NewEnabledInlineMiddleware ΒΆ
func NewEnabledInlineMiddleware(enabledFunc func(ctx context.Context, level slog.Level, next func(context.Context, slog.Level) bool) bool) Middleware
Shortcut to a middleware that implements only the `Enable` method.
func NewHandleInlineMiddleware ΒΆ
func NewHandleInlineMiddleware(handleFunc func(ctx context.Context, record slog.Record, next func(context.Context, slog.Record) error) error) Middleware
Shortcut to a middleware that implements only the `Handle` method.
func NewInlineMiddleware ΒΆ
func NewInlineMiddleware( enabledFunc func(ctx context.Context, level slog.Level, next func(context.Context, slog.Level) bool) bool, handleFunc func(ctx context.Context, record slog.Record, next func(context.Context, slog.Record) error) error, withAttrsFunc func(attrs []slog.Attr, next func([]slog.Attr) slog.Handler) slog.Handler, withGroupFunc func(name string, next func(string) slog.Handler) slog.Handler, ) Middleware
Shortcut to a middleware that implements all methods.
func NewWithAttrsInlineMiddleware ΒΆ
func NewWithAttrsInlineMiddleware(withAttrsFunc func(attrs []slog.Attr, next func([]slog.Attr) slog.Handler) slog.Handler) Middleware
Shortcut to a middleware that implements only the `WithAttrs` method.
func NewWithGroupInlineMiddleware ΒΆ
func NewWithGroupInlineMiddleware(withGroupFunc func(name string, next func(string) slog.Handler) slog.Handler) Middleware
Shortcut to a middleware that implements only the `WithAttrs` method.
type MultiHandler ΒΆ
type MultiHandler struct {
// contains filtered or unexported fields
}
type PipeBuilder ΒΆ
type PipeBuilder struct {
// contains filtered or unexported fields
}
func Pipe ΒΆ
func Pipe(middlewares ...Middleware) *PipeBuilder
func (*PipeBuilder) Pipe ΒΆ
func (h *PipeBuilder) Pipe(middleware Middleware) *PipeBuilder
type WithAttrsInlineMiddleware ΒΆ
type WithAttrsInlineMiddleware struct {
// contains filtered or unexported fields
}
type WithGroupInlineMiddleware ΒΆ
type WithGroupInlineMiddleware struct {
// contains filtered or unexported fields
}
Source Files
ΒΆ
Click to show internal directories.
Click to hide internal directories.