errorhandler

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler interface {
	HandleError() grpc.UnaryServerInterceptor
}

ErrorHandler interface

type Interceptor

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

Interceptor is the interceptor for the error handler

func NewInterceptor

func NewInterceptor(logger *slog.Logger) *Interceptor

NewInterceptor creates a new error handler interceptor

Parameters:

  • logger: the logger to use (can be nil)

Returns:

  • *Interceptor: the interceptor

func (Interceptor) HandleError

func (i Interceptor) HandleError() grpc.UnaryServerInterceptor

HandleError returns the error handler interceptor

Returns:

  • grpc.UnaryServerInterceptor: the error handler interceptor

Jump to

Keyboard shortcuts

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