lamda

package module
v0.0.0-...-828a3ab Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 3 Imported by: 0

README

awk-lamda

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is the application to run a HTTP service with AWS Lambda and AWS APIGateway.

func Default

func Default() *App

Default creates and returns a new instance with the default config.

func New

func New(config ...Config) *App

New creates and returns a new instance of application with the specified config.

func (*App) Start

func (app *App) Start()

Start runs the Lambda function.

type Config

type Config struct {
	// Context is the base context of the application.
	Context context.Context
	// ContextValues are the values in the handler context. If a base context was set, the context is
	// used as the parent.
	ContextValues map[any]any
	// ResponseEscapeHTML indicates whether the HTML in the response is escaped or not.
	ResponseEscapeHTML bool
	// SIGTERMCallbacks are the callback functions to run on SIGTERM, and it will enable the Lambda
	// SIGTERM behavior if the callbacks are not empty.
	SIGTERMCallbacks []func()
}

Jump to

Keyboard shortcuts

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