model

package
v0.0.0-...-4fa2157 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XRaySampled    = "1"
	XRayNonSampled = "0"
)
View Source
const MaxErrorCauseSizeBytes = 64 << 10

MaxErrorCauseSizeBytes limits the size of a cause, since the max X-Ray document size of 64kB

Variables

This section is empty.

Functions

func ValidatedErrorCauseJSON

func ValidatedErrorCauseJSON(errorCauseJSON []byte) ([]byte, error)

ValidatedErrorCauseJSON returns an error if the ErrorCause JSON has an invalid format

Types

type AgentEvent

type AgentEvent struct {
	EventType  string `json:"eventType"`
	DeadlineMs int64  `json:"deadlineMs"`
}

AgentEvent is one of INVOKE, SHUTDOWN agent events

type AgentInvokeEvent

type AgentInvokeEvent struct {
	*AgentEvent
	RequestID          string   `json:"requestId"`
	InvokedFunctionArn string   `json:"invokedFunctionArn"`
	Tracing            *Tracing `json:"tracing,omitempty"`
}

AgentInvokeEvent is the response to agent's get next request

type AgentShutdownEvent

type AgentShutdownEvent struct {
	*AgentEvent
	ShutdownReason string `json:"shutdownReason"`
}

AgentShutdownEvent is the response to agent's get next request

type CognitoIdentity

type CognitoIdentity struct {
	CognitoIdentityID     string `json:"cognitoIdentityId"`
	CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
}

CognitoIdentity is returned by the API server in a response headers, providing information about client's Cognito identity.

type ErrorCause

type ErrorCause struct {
	Exceptions []exception `json:"exceptions"`
	WorkingDir string      `json:"working_directory"`
	Paths      []string    `json:"paths"`
	Message    string      `json:"message,omitempty"`
}

ErrorCause represents the cause of an error reported by the runtime, and may contain stack traces and exceptions

type ErrorResponse

type ErrorResponse struct {
	ErrorMessage string   `json:"errorMessage"`
	ErrorType    string   `json:"errorType"`
	StackTrace   []string `json:"stackTrace,omitempty"`
}

ErrorResponse is a standard invoke error response, providing information about the error.

type ExtensionRegisterResponse

type ExtensionRegisterResponse struct {
	AccountID       string `json:"accountId,omitempty"`
	FunctionName    string `json:"functionName"`
	FunctionVersion string `json:"functionVersion"`
	Handler         string `json:"handler"`
}

ExtensionRegisterResponse is a response returned by the API server on extension/register post request

type StatusResponse

type StatusResponse struct {
	Status string `json:"status"`
}

StatusResponse is a response returned by the API server, providing status information.

type Tracing

type Tracing struct {
	Type TracingType `json:"type"`
	XRayTracing
}

Tracing object returned as part of agent Invoke event

func NewXRayTracing

func NewXRayTracing(value string) *Tracing

NewXRayTracing returns a new XRayTracing object with specified value

type TracingType

type TracingType string
const (
	// XRayTracingType represents an X-Ray Tracing object type
	XRayTracingType TracingType = "X-Amzn-Trace-Id"
)

type XRayTracing

type XRayTracing struct {
	Value string `json:"value"`
}

XRayTracing is a type of Tracing object

Jump to

Keyboard shortcuts

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