serverless

package
v0.0.0-...-45b38f9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// FatalNoAPIKey is the error reported to the AWS Extension environment when
	// no API key has been set. Unused until we can report error
	// without stopping the extension.
	FatalNoAPIKey ErrorEnum = "Fatal.NoAPIKey"
	// FatalDogstatsdInit is the error reported to the AWS Extension environment when
	// DogStatsD fails to initialize properly. Unused until we can report error
	// without stopping the extension.
	FatalDogstatsdInit ErrorEnum = "Fatal.DogstatsdInit"
	// FatalBadEndpoint is the error reported to the AWS Extension environment when
	// bad endpoints have been configured. Unused until we can report error
	// without stopping the extension.
	FatalBadEndpoint ErrorEnum = "Fatal.BadEndpoint"
	// FatalConnectFailed is the error reported to the AWS Extension environment when
	// a connection failed.
	FatalConnectFailed ErrorEnum = "Fatal.ConnectFailed"

	// Invoke event
	Invoke RuntimeEvent = "INVOKE"
	// Shutdown event
	Shutdown RuntimeEvent = "SHUTDOWN"

	// Timeout is one of the possible ShutdownReasons
	Timeout ShutdownReason = "timeout"
)

Variables

This section is empty.

Functions

func WaitForNextInvocation

func WaitForNextInvocation(stopCh chan struct{}, daemon *daemon.Daemon, id registration.ID) error

WaitForNextInvocation makes a blocking HTTP call to receive the next event from AWS. Note that for now, we only subscribe to INVOKE and SHUTDOWN events. Write into stopCh to stop the main thread of the running program.

Types

type ErrorEnum

type ErrorEnum string

ErrorEnum are errors reported to the AWS Extension environment.

func (ErrorEnum) String

func (e ErrorEnum) String() string

String returns the string value for this ErrorEnum.

type FlushableAgent

type FlushableAgent interface {
	Flush()
}

FlushableAgent allows flushing

type InvocationHandler

type InvocationHandler func(doneChannel chan bool, daemon *daemon.Daemon, arn string, requestID string)

InvocationHandler is the invocation handler signature

type Payload

type Payload struct {
	EventType          RuntimeEvent   `json:"eventType"`
	DeadlineMs         int64          `json:"deadlineMs"`
	InvokedFunctionArn string         `json:"invokedFunctionArn"`
	ShutdownReason     ShutdownReason `json:"shutdownReason"`
	RequestID          string         `json:"requestId"`
}

Payload is the payload read in the response while subscribing to the AWS Extension env.

type RuntimeEvent

type RuntimeEvent string

RuntimeEvent is an AWS Runtime event

type ShutdownReason

type ShutdownReason string

ShutdownReason is an AWS Shutdown reason

func (ShutdownReason) String

func (s ShutdownReason) String() string

String returns the string value for this ShutdownReason.

Directories

Path Synopsis
Package appsec provides a simple Application Security Monitoring API for serverless.
Package appsec provides a simple Application Security Monitoring API for serverless.
config
Package config defines configuration utilities for appsec
Package config defines configuration utilities for appsec
httpsec
Package httpsec defines is the HTTP instrumentation API and contract for AppSec.
Package httpsec defines is the HTTP instrumentation API and contract for AppSec.
Package debug holds logic around debug information in the Lambda Extension
Package debug holds logic around debug information in the Lambda Extension
Package remoteconfig provides a remote configuration service constructor for serverless
Package remoteconfig provides a remote configuration service constructor for serverless
Package streamlogs package is responsible for stream-logs on the serverless environment.
Package streamlogs package is responsible for stream-logs on the serverless environment.
propagation
Package propagation manages propagation of trace context headers.
Package propagation manages propagation of trace context headers.
events
Package events provides a series of drop in replacements for "github.com/aws/aws-lambda-go/events".
Package events provides a series of drop in replacements for "github.com/aws/aws-lambda-go/events".

Jump to

Keyboard shortcuts

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