service

package
v0.0.0-...-53ff5f4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(service.Service) service.Service

Service middleware (closure).

func ErrorLoggingMiddleware

func ErrorLoggingMiddleware(logger log.Logger) Middleware

ErrorLoggingMiddleware writes to logger any error, if it is not nil.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware writes params, results and working time of method call to provided logger after its execution.

func RecoveringMiddleware

func RecoveringMiddleware(logger log.Logger) Middleware

RecoveringMiddleware recovers panics from method calls, writes to provided logger and returns the error of panic as method error.

Jump to

Keyboard shortcuts

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