standard

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package standard provides a default entry point for lambda with logger and panic recovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(h lambda.Handler, opts ...Option)

Default configures a standard lambda handler with default middleware which includes the zerolog and raw logging.

func GenericDefault

func GenericDefault[I any, O any](handler func(context.Context, I) (O, error), opts ...Option)

GenericDefault configures a generic standard lambda handler with default middleware which includes the zerolog and raw logging.

Types

type Option

type Option func(config *defaultConfig)

Option configures the default middleware stack.

func Append

func Append(mw middleware.Middleware) Option

Append middleware to the chain. Defaults to raw and zerolog middleware.

func Fields

func Fields(fields map[string]any) Option

Fields pass a map of attributes which are appended to all log messages and raw events.

func LogLevel

func LogLevel(level zerolog.Level) Option

LogLevel minimum accepted level for logging. Defaults to zerolog.InfoLevel.

func Output

func Output(output io.Writer) Option

Output is a writer where logs in JSON format are written. Defaults to os.Stderr.

func RawEnabled

func RawEnabled(flag bool) Option

RawEnabled is a flag to toggle this middleware on or off. Defaults to true.

Jump to

Keyboard shortcuts

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