middleware

package
v0.0.0-...-2ebb6ce Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package middleware for lambda requests

Package middleware for lambda requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRecovery

func WithRecovery(h alexa.Handler, lable log.Loggable) alexa.Handler

WithRecovery recovers from panics and log the error.

func WithRequestStats

func WithRequestStats(h alexa.Handler, sable stats.Statable) alexa.Handler

WithRequestStats adds counter and timing stats to intent requests.

Types

type Recovery

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

Recovery is a middleware that will recover from panics and logs the error.

func (Recovery) Serve

func (m Recovery) Serve(b *alexa.ResponseBuilder, r *alexa.RequestEnvelope)

Serve serves the request.

Jump to

Keyboard shortcuts

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