lambda

package
v0.0.0-...-0cbb24e Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamRuntimeAPI        = `lambda-runtime-api`
	ParamEntryPointName    = `lamda-entrypoint-name`
	ParamEnableManualFlush = `enable-manual-flush`
	ParamTelemetryAddr     = `telemetry-addr`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension = extension.Server

Extension exposes the internal type definition.

Note: This is not ideal but simplifies exposing the API.

func NewExtension

func NewExtension(logger logrus.FieldLogger, server *statsd.Server, opts Options) (Extension, error)

NewExtension extends a `statsd.Server` by adding a server that integrates with the AWS Lambda Extension Runtime API to allow near native support for on host collection. The provided server is then run within the extension in additional to the server for AWS integration.

type Options

type Options struct {
	// RuntimeAPI is AWS service that is responsible for orchestrating
	// the extension with the other Lambda's that are part of the deployment.
	// This will set to `env:AWS_LAMBDA_RUNTIME_API` by default as per the docs,
	// but can be overriden for testing purposes and validation.
	RuntimeAPI string
	// ExecutableName is the full file name of the lambda extension that is
	// used to validate the bootstrap process.
	ExecutableName string
	// EnableManualFlush allows for Lambda's
	// to control when the forwarder would send the accumlated metrics.
	EnableManualFlush bool
	// TelemetryAddr is used by the AWS runtime to publish
	// events back to service.
	TelemetryAddr string
}

Options is used to provide overrides when calling `NewExtension`

func NewOptionsFromEnvironment

func NewOptionsFromEnvironment() Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags is used to add preconfigured entries into an existing `FlagSet`

func (Options) Validate

func (o Options) Validate() (errs error)

Validate ensure all the values are valid, any values that not are reported as errors. All invalid values are reported together.

Jump to

Keyboard shortcuts

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