interceptor

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(
	ctx context.Context,
	subscriber *natsx.Subscriber,
	handler natsx.SubscriberHandler,
) error

Logger is a middleware that logs the current result from request.

func Recover

func Recover() natsx.SubscriberInterceptor

Recover is a middleware that recovers server from panic. Recover also dumps stack trace on panic occurrence.

func RequestID added in v1.1.0

func RequestID(
	ctx context.Context,
	subscriber *natsx.Subscriber,
	handler natsx.SubscriberHandler,
) error

RequestID is a middleware that inject request id to the context if it doesn't exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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