middleware

package
v0.0.0-...-20ca37a Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: GPL-3.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogMiddleware = func(name string) endpoint.Middleware {
		return func(handler endpoint.Endpoint) endpoint.Endpoint {
			return func(ctx context.Context, req, resp interface{}) error {
				err := handler(ctx, req, resp)
				log.CtxInfo(ctx, "[%s RPC Request] req=%s, resp=%s, err=%v", name, util.JSONF(req), util.JSONF(resp), err)
				return err
			}
		}
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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