loghandler

package
v0.7.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = fmt.Errorf("invalid input")
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler logs information about the message being processed and sends the message to the next handler in the chain.

func New

func New(next wrpkit.Handler, logger *zap.Logger, level ...zapcore.Level) (*Handler, error)

New creates a new Handler. If the next handler is nil or the logger is nil, an error is returned. If no level is provided, DebugLevel is used.

func (Handler) HandleWrp

func (h Handler) HandleWrp(msg wrp.Message) error

HandleWrp is called to process a message. If the next handler fails to process the message, a response is sent to the source of the message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL