{"modulePath":"github.com/aws/aws-lambda-runtime-interface-emulator","version":"v0.0.0-20261030222936-bef5c4ba774d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package handler\n\n## Constants\n\n```go\nconst (\n\t// LambdaAgentIdentifier is the header key for passing agent's id\n\tLambdaAgentIdentifier        string = \"Lambda-Extension-Identifier\"\n\tLambdaAgentFunctionErrorType string = \"Lambda-Extension-Function-Error-Type\"\n\t// LambdaAgentName is agent name, provided by user (internal agents) or equal to executable basename (external agents)\n\tLambdaAgentName string = \"Lambda-Extension-Name\"\n\n\tErrAgentIdentifierMissing string = \"Extension.MissingExtensionIdentifier\"\n\tErrAgentIdentifierInvalid string = \"Extension.InvalidExtensionIdentifier\"\n\n\tStateTransitionFailedForExtensionMessageFormat string = \"State transition from %s to %s failed for extension %s. Error: %s\"\n\tStateTransitionFailedForRuntimeMessageFormat   string = \"State transition from %s to %s failed for runtime. Error: %s\"\n)\n```\n\n```go\nconst (\n\tStreamingFunctionResponseMode = \"streaming\"\n)\n```\n\n## Functions\n\n```go\nfunc NewAgentExitErrorHandler(registrationService core.RegistrationService) http.Handler\n```\nNewAgentExitErrorHandler returns a new instance of http handler for serving /extension/exit/error\n\n```go\nfunc NewAgentInitErrorHandler(registrationService core.RegistrationService) http.Handler\n```\nNewAgentInitErrorHandler returns a new instance of http handler for serving /extension/init/error\n\n```go\nfunc NewAgentNextHandler(registrationService core.RegistrationService, renderingService *rendering.EventRenderingService) http.Handler\n```\nNewAgentNextHandler returns a new instance of http handler for serving /extension/event/next\n\n```go\nfunc NewAgentRegisterHandler(registrationService core.RegistrationService) http.Handler\n```\nNewAgentRegisterHandler returns a new instance of http handler for serving /extension/register\n\n```go\nfunc NewCredentialsHandler(credentialsService core.CredentialsService) http.Handler\n```\n\n```go\nfunc NewInitErrorHandler(registrationService core.RegistrationService) http.Handler\n```\nNewInitErrorHandler returns a new instance of http handler for serving /runtime/init/error.\n\n```go\nfunc NewInvocationErrorHandler(registrationService core.RegistrationService) http.Handler\n```\nNewInvocationErrorHandler returns a new instance of http handler for serving /runtime/invocation/{awsrequestid}/error.\n\n```go\nfunc NewInvocationNextHandler(registrationService core.RegistrationService, renderingService *rendering.EventRenderingService) http.Handler\n```\nNewInvocationNextHandler returns a new instance of http handler for serving /runtime/invocation/next.\n\n```go\nfunc NewInvocationResponseHandler(registrationService core.RegistrationService) http.Handler\n```\nNewInvocationResponseHandler returns a new instance of http handler for serving /runtime/invocation/{awsrequestid}/response.\n\n```go\nfunc NewPingHandler() http.Handler\n```\nNewPingHandler returns a new instance of http handler for serving /ping.\n\n```go\nfunc NewRestoreErrorHandler(registrationService core.RegistrationService) http.Handler\n```\n\n```go\nfunc NewRestoreNextHandler(registrationService core.RegistrationService, renderingService *rendering.EventRenderingService) http.Handler\n```\n\n```go\nfunc NewRuntimeLogsAPIStubHandler() http.Handler\n```\nNewRuntimeLogsAPIStubHandler returns a new instance of http handler for serving /runtime/logs when a telemetry service implementation is absent\n\n```go\nfunc NewRuntimeTelemetryAPIStubHandler() http.Handler\n```\nNewRuntimeTelemetryAPIStubHandler returns a new instance of http handler for serving /runtime/logs when a telemetry service implementation is absent\n\n```go\nfunc NewRuntimeTelemetrySubscriptionHandler(registrationService core.RegistrationService, telemetrySubscription telemetry.SubscriptionAPI) http.Handler\n```\nNewRuntimeTelemetrySubscriptionHandler returns a new instance of http handler for serving /runtime/logs\n\n## Types\n\n```go\ntype CtxKey int\n```\nA CtxKey type is used as a key for storing values in the request context.\n\n```go\nconst (\n\tAgentIDCtxKey CtxKey = iota\n)\n```\nAgentIDCtxKey is the context key for fetching agent's UUID\n\n```go\ntype ErrAgentIdentifierUnknown struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewErrAgentIdentifierUnknown(agentID uuid.UUID) *ErrAgentIdentifierUnknown\n```\n\n```go\nfunc (e *ErrAgentIdentifierUnknown) Error() string\n```\n\n```go\ntype RegisterRequest struct {\n\tEvents []core.Event `json:\"events\"`\n}\n```\nRegisterRequest represent /extension/register JSON body\n\n","path":"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/rapi/handler","name":"handler","synopsis":"","isRedistributable":true}
