app

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

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 main application.

func New

func New(ctx context.Context, opts ...ConfigOption) (*App, error)

New returns an App or an error if the creation failed.

func (*App) Run

func (app *App) Run(ctx context.Context) error

Run runs the app.

type ConfigOption added in v1.2.0

type ConfigOption func(*appConfig)

ConfigOption is used to configure the lambda extension

func WithAWSConfig added in v1.2.0

func WithAWSConfig(awsConfig aws.Config) ConfigOption

WithAWSConfig sets the AWS config.

func WithExtensionName

func WithExtensionName(name string) ConfigOption

WithExtensionName sets the extension name.

func WithFunctionLogSubscription added in v1.2.0

func WithFunctionLogSubscription() ConfigOption

WithFunctionLogSubscription enables the logs api subscription to function log stream. This option will only work if LogsAPI is not disabled by the WithoutLogsAPI config option.

func WithLambdaRuntimeAPI

func WithLambdaRuntimeAPI(api string) ConfigOption

WithLambdaRuntimeAPI sets the AWS Lambda Runtime API endpoint (normally taken from $AWS_LAMBDA_RUNTIME_API), used by the AWS client.

func WithLogLevel

func WithLogLevel(level string) ConfigOption

WithLogLevel sets the log level.

func WithLogsapiAddress

func WithLogsapiAddress(s string) ConfigOption

WithLogsapiAddress sets the listener address of the server listening for logs event.

func WithoutLogsAPI

func WithoutLogsAPI() ConfigOption

WithoutLogsAPI disables the logs api.

Jump to

Keyboard shortcuts

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