extension

package
v0.0.0-...-65a99ba Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedRegistration          = errors.New("extension failed to register with lambda")
	ErrIssueProgress               = errors.New("unable continue execution")
	ErrServerEarlyExit             = errors.New("server has shutdown early without cause")
	ErrFailedTelemetrySubscription = errors.New("extension failed to subscribe to lambda telemetry API")
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Run(ctx context.Context, server Server) error
}

Manager ensures that the lifetime management of the lambda

func NewManager

func NewManager(lambdaDomain string, lambdaFileName string, log logrus.FieldLogger, opts ...ManagerOpt) Manager

type ManagerOpt

type ManagerOpt func(*manager)

func WithManualFlushEnabled

func WithManualFlushEnabled(fc flush.Coordinator, telemetryServerAddr string) ManagerOpt

WithManualFlushEnabled enables a flush per invocation, it requires a flush.Coordinator to trigger the flush and will register it as a telemetry server callback. A server address will also need to be provided for the server to run on.

type Server

type Server interface {
	Run(ctx context.Context) error
}

Server is an interface to the gostatsd.Server type, the main purpose here is to allow for mocks to be used throughout testing and reduce the amount of set up code to test

Directories

Path Synopsis
Package api defines the interaction that is done between the aditional runtime (the current running extension) and the main business logic function running along aside it.
Package api defines the interaction that is done between the aditional runtime (the current running extension) and the main business logic function running along aside it.
Package telemetry defines the apis and server required to interact with the subscribe to the Telemetry API for AWS lambdas.
Package telemetry defines the apis and server required to interact with the subscribe to the Telemetry API for AWS lambdas.

Jump to

Keyboard shortcuts

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