Documentation ¶
Index ¶
- func DefaultLogEventLogFunc[T, R any](ctx context.Context, evt T, res R, err error)
- func LogEvent[T, R any]() engine.Decorator[T, R]
- func LogEventWithConfig[T, R any](config LogEventConfig[T, R]) engine.Decorator[T, R]
- func PanicRecover[T, R any]() engine.Decorator[T, R]
- func PanicRecoverWithConfig[T, R any](config PanicRecoverConfig[T]) engine.Decorator[T, R]
- type LogEventConfig
- type PanicRecoverConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogEventLogFunc ¶
func LogEventWithConfig ¶
func LogEventWithConfig[T, R any](config LogEventConfig[T, R]) engine.Decorator[T, R]
func PanicRecover ¶
PanicRecover is a decorator that recovers from panic and returns an error.
func PanicRecoverWithConfig ¶
func PanicRecoverWithConfig[T, R any](config PanicRecoverConfig[T]) engine.Decorator[T, R]
PanicRecoverWithConfig is a decorator that recovers from panic and returns an error with a custom configuration.
Types ¶
type LogEventConfig ¶
func DefaultLogEventConfig ¶
func DefaultLogEventConfig[T, R any]() LogEventConfig[T, R]
type PanicRecoverConfig ¶
PanicRecoverConfig is the configuration for the PanicRecover decorator.
func DefaultPanicRecoverConfig ¶
func DefaultPanicRecoverConfig[T any]() PanicRecoverConfig[T]
DefaultPanicRecoverConfig returns the default configuration for the PanicRecover decorator.
Click to show internal directories.
Click to hide internal directories.