{"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 functional\n\n## Constants\n\n```go\nconst (\n\tContentTypeHeader              = \"Content-Type\"\n\tLambdaInvocationIDHeader       = \"Lambda-Runtime-Aws-Request-Id\"\n\tLambdaInvocationDeadlineHeader = \"Lambda-Runtime-Deadline-Ms\"\n\tLambdaErrorTypeHeader          = \"Lambda-Runtime-Function-Error-Type\"\n\tLambdaErrorBodyHeader          = \"Lambda-Runtime-Function-Error-Body\"\n\tLambdaResponseModeHeader       = \"Lambda-Runtime-Function-Response-Mode\"\n\tLambdaXRayErrorCauseHeader     = \"Lambda-Runtime-Function-XRay-Error-Cause\"\n)\n```\n\n## Functions\n\n```go\nfunc HttpGetWithHeaders(client *http.Client, url string, headers *map[string]string) (*http.Response, error)\n```\n\n```go\nfunc HttpPostWithHeaders(client *http.Client, url string, data []byte, headers *map[string]string) (*http.Response, error)\n```\n\n```go\nfunc MakeMockFileUtil(extensions ExtensionsEnv) *utils.MockFileUtil\n```\n\n```go\nfunc SetupMockFileUtil(extensions ExtensionsEnv, hasBootstrap bool, hasVarTask bool) *utils.MockFileUtil\n```\n\n## Types\n\n```go\ntype ChunkedReader struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewChunkedReader(chunks []string, delay time.Duration) *ChunkedReader\n```\n\n```go\nfunc (r *ChunkedReader) Read(p []byte) (n int, err error)\n```\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(endpoint netip.AddrPort) *Client\n```\n\n```go\nfunc NewExtensionsClient(endpoint netip.AddrPort) *Client\n```\n\n```go\nfunc (client *Client) ExtensionsExitError(agentIdentifier, functionErrorType, payload string) (*StatusResponse, errorExtensions)\n```\n\n```go\nfunc (client *Client) ExtensionsInitError(agentIdentifier, functionErrorType, payload string) (*StatusResponse, errorExtensions)\n```\n\n```go\nfunc (client *Client) ExtensionsNext(agentIdentifier string) (interface{}, errorExtensions)\n```\n\n```go\nfunc (client *Client) ExtensionsNextWithHeaders(headers map[string]string) (interface{}, errorExtensions)\n```\n\n```go\nfunc (client *Client) ExtensionsRegister(agentUniqueName string, events []Event) (*http.Response, errorExtensions)\n```\n\n```go\nfunc (client *Client) ExtensionsSleep(d time.Duration)\n```\n\n```go\nfunc (client *Client) ExtensionsTelemetrySubscribe(agentIdentifier string, agentName string, body io.Reader, headers map[string][]string, remoteAddr string) (*http.Response, errorExtensions)\n```\n\n```go\nfunc (client *Client) InitError(payload string, contentType string, errorType string) (*http.Response, error)\n```\n\n```go\nfunc (client *Client) Next(body io.Reader) *http.Response\n```\n\n```go\nfunc (client *Client) Response(invokeID interop.InvokeID, payload io.Reader, contentType string, responseModeHeader string, trailers map[string]string) (*http.Response, error)\n```\n\n```go\nfunc (client *Client) ResponseError(invokeID interop.InvokeID, payload string, contentType string, errorType string, errorCause string) (*http.Response, error)\n```\n\n```go\nfunc (client *Client) ResponseErrorWithHeaders(invokeID interop.InvokeID, payload string, headers map[string]string) (*http.Response, error)\n```\n\n```go\nfunc (client *Client) ResponseWithHeaders(invokeID interop.InvokeID, payload io.Reader, contentType string, responseModeHeader string, trailers map[string]string, extraHeaders map[string]string) (*http.Response, error)\n```\n\n```go\ntype ConfigKey string\n```\n\n```go\ntype Event string\n```\n\n```go\nconst (\n\tShutdown Event = \"SHUTDOWN\"\n)\n```\n\n```go\ntype EventType string\n```\n\n```go\nconst (\n\tPlatformInitStart       EventType = \"platform.initStart\"\n\tPlatformInitRuntimeDone EventType = \"platform.initRuntimeDone\"\n\tPlatformInitReport      EventType = \"platform.initReport\"\n\tPlatformRuntimeStart    EventType = \"platform.runtimeStart\"\n\tPlatformReport          EventType = \"platform.report\"\n)\n```\n\n```go\ntype ExecutionEnvironmentAction interface {\n\tExecute(t *testing.T, client *Client) (*http.Response, error)\n\tValidateStatus(t *testing.T, resp *http.Response)\n\tString() string\n}\n```\n\n```go\ntype ExitAction struct {\n\tExitCode int32\n\n\tCrashingProcessName string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a ExitAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExitAction) String() string\n```\n\n```go\nfunc (a ExitAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExpectedExtensionEvents struct {\n\tExtensionName string\n\tState         string\n\tErrorType     string\n}\n```\n\n```go\ntype ExpectedGlobalData struct {\n\tFunctionARN     string\n\tFunctionVersion string\n}\n```\n\n```go\ntype ExpectedInitEvent struct {\n\tEventType EventType\n\tStatus    string\n\tErrorType string\n}\n```\n\n```go\ntype ExpectedInvokeEvents struct {\n\tEventType EventType\n\n\tStatus string\n\n\tSpans []string\n}\n```\n\n```go\ntype ExtensionTelemetrySubscribeAction struct {\n\tAgentIdentifier string\n\tAgentName       string\n\n\tPayload io.Reader\n\n\tHeaders map[string][]string\n\n\tRemoteAddr string\n\n\tExpectedStatus int\n\n\tExpectedErrorType string\n\n\tExpectedErrorMessage string\n}\n```\n\n```go\nfunc (a ExtensionTelemetrySubscribeAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionTelemetrySubscribeAction) String() string\n```\n\n```go\nfunc (a ExtensionTelemetrySubscribeAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsEnv = map[string]*ExtensionsExecutionEnvironment\n```\n\n```go\ntype ExtensionsExecutionEnvironment struct {\n\tActions []ExecutionEnvironmentAction\n\n\tForcedError error\n\n\tExtensionIdentifier uuid.UUID\n\tT                   *testing.T\n\tExitProcessOnce     func()\n\tStdout, Stderr      io.Writer\n\tDone                sync.WaitGroup\n}\n```\n\n```go\nfunc (e *ExtensionsExecutionEnvironment) Exec(request *model.ExecRequest) (\u003c-chan struct{}, error)\n```\n\n```go\nfunc (e *ExtensionsExecutionEnvironment) Kill() error\n```\n\n```go\nfunc (e *ExtensionsExecutionEnvironment) Terminate() error\n```\n\n```go\ntype ExtensionsExitErrorAction struct {\n\tAgentIdentifier   string\n\tFunctionErrorType string\n\tPayload           string\n\tExpectedStatus    int\n}\n```\n\n```go\nfunc (a ExtensionsExitErrorAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsExitErrorAction) String() string\n```\n\n```go\nfunc (a ExtensionsExitErrorAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsInitErrorAction struct {\n\tAgentIdentifier   string\n\tFunctionErrorType string\n\tPayload           string\n\tExpectedStatus    int\n}\n```\n\n```go\nfunc (a ExtensionsInitErrorAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsInitErrorAction) String() string\n```\n\n```go\nfunc (a ExtensionsInitErrorAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsNextAction struct {\n\tAgentIdentifier string\n\tExpectedStatus  int\n}\n```\n\n```go\nfunc (a ExtensionsNextAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsNextAction) String() string\n```\n\n```go\nfunc (a ExtensionsNextAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsNextParallelAction struct {\n\tAgentIdentifier string\n\tExpectedStatus  int\n\tParallelActions []ExecutionEnvironmentAction\n\tEnvironment     *ExtensionsExecutionEnvironment\n}\n```\n\n```go\nfunc (a ExtensionsNextParallelAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsNextParallelAction) String() string\n```\n\n```go\nfunc (a ExtensionsNextParallelAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsRegisterAction struct {\n\tAgentUniqueName string\n\n\tEvents         []Event\n\tExpectedStatus int\n}\n```\n\n```go\nfunc (a ExtensionsRegisterAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsRegisterAction) String() string\n```\n\n```go\nfunc (a ExtensionsRegisterAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsTelemetryAPIHTTPSubscriberAction struct {\n\tSubscription      ExtensionTelemetrySubscribeAction\n\tInMemoryEventsApi *InMemoryEventsApi\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a ExtensionsTelemetryAPIHTTPSubscriberAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsTelemetryAPIHTTPSubscriberAction) String() string\n```\n\n```go\nfunc (a ExtensionsTelemetryAPIHTTPSubscriberAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype ExtensionsTelemetryAPITCPSubscriberAction struct {\n\tSubscription      ExtensionTelemetrySubscribeAction\n\tInMemoryEventsApi *InMemoryEventsApi\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a ExtensionsTelemetryAPITCPSubscriberAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a ExtensionsTelemetryAPITCPSubscriberAction) String() string\n```\n\n```go\nfunc (a ExtensionsTelemetryAPITCPSubscriberAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype FluxPumpServer struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewFluxPumpServer() *FluxPumpServer\n```\n\n```go\nfunc (s *FluxPumpServer) GetAddrPort() netip.AddrPort\n```\n\n```go\nfunc (s *FluxPumpServer) GetRequests() []SubscribeRequestLog\n```\n\n```go\nfunc (s *FluxPumpServer) ServeHTTP(w http.ResponseWriter, r *http.Request)\n```\n\n```go\nfunc (s *FluxPumpServer) Start(fxPumpAddrPort netip.AddrPort) error\n```\n\n```go\nfunc (s *FluxPumpServer) Stop() error\n```\n\n```go\ntype InMemoryEventsApi struct {\n\tInvokeXRAYErrorCause map[interop.InvokeID]interop.InternalXRayErrorCauseData\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewInMemoryEventsApi(t *testing.T) *InMemoryEventsApi\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckComprehensiveInitExpectations(startTimestamp time.Time, finishTimestamp time.Time, expectedMinimalInitDuration time.Duration, expectedInitEvents []ExpectedInitEvent, initReq model.InitRequestMessage)\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckComprehensiveInvokeExpectations(startTimestamp time.Time, finishTimestamp time.Time, invokeID interop.InvokeID, expectedInvokeEvents []ExpectedInvokeEvents, initReq model.InitRequestMessage, expectedInvokeLatency time.Duration, expectedInvokeRespDuration time.Duration)\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckSimpleExtensionExpectations(expectedExtensionsEvents []ExpectedExtensionEvents)\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckSimpleInitExpectations(startTimestamp time.Time, finishTimestamp time.Time, expectedInitEvents []ExpectedInitEvent, initReq model.InitRequestMessage)\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckSimpleInvokeExpectations(startTimestamp time.Time, finishTimestamp time.Time, invokeID interop.InvokeID, expectedInvokeEvents []ExpectedInvokeEvents, initReq model.InitRequestMessage)\n```\n\n```go\nfunc (e *InMemoryEventsApi) CheckXRayErrorCauseExpectations(invokeID interop.InvokeID, expectedErrorCause string)\n```\n\n```go\nfunc (e *InMemoryEventsApi) Flush()\n```\n\n```go\nfunc (e *InMemoryEventsApi) LogLines() []telemetry.Event\n```\n\n```go\nfunc (e *InMemoryEventsApi) RecordLogLine(ev telemetry.Event)\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendExtensionInit(data interop.ExtensionInitData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendImageError(errLog interop.ImageErrorLogData)\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendInitReport(data interop.InitReportData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendInitRuntimeDone(data interop.InitRuntimeDoneData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendInitStart(data interop.InitStartData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendInternalXRayErrorCause(data interop.InternalXRayErrorCauseData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendInvokeStart(data interop.InvokeStartData) error\n```\n\n```go\nfunc (e *InMemoryEventsApi) SendReport(data interop.ReportData) error\n```\n\n```go\ntype InitErrorAction struct {\n\tPayload        string\n\tContentType    string\n\tErrorType      string\n\tExpectedStatus int\n}\n```\n\n```go\nfunc (a InitErrorAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a InitErrorAction) String() string\n```\n\n```go\nfunc (a InitErrorAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype InvocationResponseAction struct {\n\tPayload            io.Reader\n\tContentType        string\n\tInvokeID           interop.InvokeID\n\tResponseModeHeader string\n\tResponseHeaders    map[string]string\n\tExpectedStatus     int\n\tExpectedBody       string\n\tTrailers           map[string]string\n}\n```\n\n```go\nfunc (a InvocationResponseAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a InvocationResponseAction) String() string\n```\n\n```go\nfunc (a InvocationResponseAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype InvocationResponseErrorAction struct {\n\tPayload         string\n\tContentType     string\n\tInvokeID        interop.InvokeID\n\tErrorType       string\n\tErrorCause      string\n\tResponseHeaders map[string]string\n\tExpectedStatus  int\n\tExpectedBody    string\n}\n```\n\n```go\nfunc (a InvocationResponseErrorAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a InvocationResponseErrorAction) String() string\n```\n\n```go\nfunc (a InvocationResponseErrorAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype InvocationStreamingResponseAction struct {\n\tChunks             []string\n\tBody               io.Reader\n\tContentType        string\n\tInvokeID           interop.InvokeID\n\tResponseModeHeader string\n\tChunkDelay         time.Duration\n\tTrailers           map[string]string\n}\n```\n\n```go\nfunc (a InvocationStreamingResponseAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a InvocationStreamingResponseAction) String() string\n```\n\n```go\nfunc (a InvocationStreamingResponseAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype MockSupervisor struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewMockSupervisor(t *testing.T, runtime process, extensions ExtensionsEnv, eventsErr error) *MockSupervisor\n```\n\n```go\nfunc (m *MockSupervisor) Events(_ context.Context) (\u003c-chan model.Event, error)\n```\n\n```go\nfunc (m *MockSupervisor) Exec(_ context.Context, request *model.ExecRequest) error\n```\n\n```go\nfunc (m *MockSupervisor) Kill(_ context.Context, request *model.KillRequest) error\n```\n\n```go\nfunc (m *MockSupervisor) Terminate(_ context.Context, request *model.TerminateRequest) error\n```\n\n```go\ntype NextAction struct {\n\tPayload        string\n\tExpectedStatus int\n}\n```\n\n```go\nfunc (a NextAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a NextAction) String() string\n```\n\n```go\nfunc (a NextAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype NextResponse struct {\n\tEventType Event `json:\"eventType\"`\n}\n```\n\n```go\ntype RapidHTTPError struct {\n\tStatusCode int\n\tStatus     string\n}\n```\n\n```go\nfunc (s *RapidHTTPError) Error() string\n```\n\n```go\ntype RegisterRequest struct {\n\tEvents []Event\n}\n```\n\n```go\ntype RuntimeEnv struct {\n\tWorkers []RuntimeExecutionEnvironment\n\n\tForcedError      error\n\tT                *testing.T\n\tExitProcessOnce  func()\n\tStdout, Stderr   io.Writer\n\tInvokeResponseWG *sync.WaitGroup\n\tDone             sync.WaitGroup\n}\n```\n\n```go\nfunc (r *RuntimeEnv) Exec(request *model.ExecRequest) (\u003c-chan struct{}, error)\n```\n\n```go\nfunc (r *RuntimeEnv) Kill() error\n```\n\n```go\nfunc (r *RuntimeEnv) Terminate() error\n```\n\n```go\ntype RuntimeExecutionEnvironment struct {\n\tActions      []ExecutionEnvironmentAction\n\tInvokeID     interop.InvokeID\n\tInvocationID string\n\tRuntimeEnv   *RuntimeEnv\n}\n```\n\n```go\ntype ShutdownResponse struct {\n\t*NextResponse\n\tShutdownReason string `json:\"shutdownReason\"`\n\tDeadlineMs     int64  `json:\"deadlineMs\"`\n}\n```\n\n```go\ntype SleepAction struct {\n\tDuration time.Duration\n}\n```\n\n```go\nfunc (a SleepAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a SleepAction) String() string\n```\n\n```go\nfunc (a SleepAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype SleepExtensionAction struct {\n\tDuration time.Duration\n}\n```\n\n```go\nfunc (a SleepExtensionAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a SleepExtensionAction) String() string\n```\n\n```go\nfunc (a SleepExtensionAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype StatusResponse struct {\n\tStatus string `json:\"status\"`\n}\n```\n\n```go\ntype StderrAction struct {\n\tPayload string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a StderrAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a StderrAction) String() string\n```\n\n```go\nfunc (a StderrAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype StdoutAction struct {\n\tPayload string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a StdoutAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a StdoutAction) String() string\n```\n\n```go\nfunc (a StdoutAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n```go\ntype SubscribeRequestLog struct {\n\tAgentName  string\n\tPassphrase string\n\tBody       []byte\n\tHeaders    map[string][]string\n\tRemoteAddr string\n\tTimestamp  time.Time\n}\n```\n\n```go\ntype WaitInvokeResponseAction struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (a WaitInvokeResponseAction) Execute(t *testing.T, client *Client) (*http.Response, error)\n```\n\n```go\nfunc (a WaitInvokeResponseAction) String() string\n```\n\n```go\nfunc (a WaitInvokeResponseAction) ValidateStatus(t *testing.T, resp *http.Response)\n```\n\n","path":"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda-managed-instances/testutils/functional","name":"functional","synopsis":"","isRedistributable":true}
