Documentation ¶
Overview ¶
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.
For further infomation regarding lambda extensions:
https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#runtimes-extensions-registration-api
Index ¶
Constants ¶
View Source
const ( EnvLambdaAPIHostname = "AWS_LAMBDA_RUNTIME_API" // Version defines the used OpenAPI spec being adhere to // by the connecting client. It is used as part of the // generated URI to be used to issue connections. Version = "2020-01-01" RegisterEndpoint LambdaPath = "/" + Version + "/extension/register" EventEndpoint LambdaPath = "/" + Version + "/extension/event/next" InitErrorEndpoint LambdaPath = "/" + Version + "/extension/init/error" ExitErrorEndpoint LambdaPath = "/" + Version + "/extension/exit/error" Invoke Event = "INVOKE" Shutdown Event = "SHUTDOWN" LambdaExtensionNameHeaderKey = "Lambda-Extension-Name" LambdaExtensionIdentifierHeaderKey = "Lambda-Extension-Identifier" LambdaErrorHeaderKey = "Lambda-Extension-Function-Error-Type" LambdaExtensionEventIdentifer = "Lambda-Extension-Event-Identifier" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorRequest ¶
type ErrorRequest struct { Message string `json:"errorMessage"` Type string `json:"errorType"` StackTrace []string `json:"stackTrace"` }
Defining the types used when processing errors
type ErrorResponse ¶
type EventNextPayload ¶
type EventNextPayload struct { EventType Event `json:"eventType"` Deadline int64 `json:"deadlineMs"` RequestID string `json:"requestId"` InvokedFunctionARN string `json:"invokedFunctionArn"` Tracing map[string]string `json:"tracing"` ShutdownReason string `json:"shutdownReason"` }
Defining types used within the next phase of the extension
type LambdaPath ¶
type LambdaPath string
func (LambdaPath) GetUrl ¶
func (lp LambdaPath) GetUrl(domain string) string
func (LambdaPath) String ¶
func (lp LambdaPath) String() string
type RegisterRequestPayload ¶
type RegisterRequestPayload struct {
Events []Event `json:"events"`
}
type RegisterResponsePayload ¶
type StatusResponse ¶
type StatusResponse struct {
Status string `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.