Documentation ¶
Index ¶
- type ColdStartTags
- type ExecutionContext
- func (ec *ExecutionContext) GetColdStartTagsForRequestID(requestID string) ColdStartTags
- func (ec *ExecutionContext) GetCurrentState() State
- func (ec *ExecutionContext) IsStateSaved() bool
- func (ec *ExecutionContext) LastRequestID() string
- func (ec *ExecutionContext) RestoreCurrentStateFromFile() error
- func (ec *ExecutionContext) SaveCurrentExecutionContext() error
- func (ec *ExecutionContext) SetArnFromExtensionResponse(arn string)
- func (ec *ExecutionContext) SetFromInvocation(arn string, requestID string)
- func (ec *ExecutionContext) SetInitializationTime(time time.Time)
- func (ec *ExecutionContext) UpdateEndTime(time time.Time)
- func (ec *ExecutionContext) UpdateOutOfMemoryRequestID(requestId string)
- func (ec *ExecutionContext) UpdatePersistedStateFilePath(path string)
- func (ec *ExecutionContext) UpdateRuntime(runtime string)
- func (ec *ExecutionContext) UpdateStartTime(time time.Time)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColdStartTags ¶
type ExecutionContext ¶
type ExecutionContext struct {
// contains filtered or unexported fields
}
ExecutionContext represents the execution context
func (*ExecutionContext) GetColdStartTagsForRequestID ¶
func (ec *ExecutionContext) GetColdStartTagsForRequestID(requestID string) ColdStartTags
Returns whether or not the given request ID is a cold start or is a proactive init
func (*ExecutionContext) GetCurrentState ¶
func (ec *ExecutionContext) GetCurrentState() State
GetCurrentState gets the current state of the execution context
func (*ExecutionContext) IsStateSaved ¶
func (ec *ExecutionContext) IsStateSaved() bool
IsStateSaved returns whether the state has been saved in the current execution
func (*ExecutionContext) LastRequestID ¶
func (ec *ExecutionContext) LastRequestID() string
LastRequestID return the last seen request identifier through the extension API.
func (*ExecutionContext) RestoreCurrentStateFromFile ¶
func (ec *ExecutionContext) RestoreCurrentStateFromFile() error
RestoreCurrentStateFromFile loads the current context from a file
func (*ExecutionContext) SaveCurrentExecutionContext ¶
func (ec *ExecutionContext) SaveCurrentExecutionContext() error
SaveCurrentExecutionContext stores the current context to a file
func (*ExecutionContext) SetArnFromExtensionResponse ¶
func (ec *ExecutionContext) SetArnFromExtensionResponse(arn string)
SetArnFromExtensionResponse sets the execution context from the Extension API response
func (*ExecutionContext) SetFromInvocation ¶
func (ec *ExecutionContext) SetFromInvocation(arn string, requestID string)
SetFromInvocation sets the execution context based on an invocation
func (*ExecutionContext) SetInitializationTime ¶
func (ec *ExecutionContext) SetInitializationTime(time time.Time)
SetInitTime sets the agent initialization time
func (*ExecutionContext) UpdateEndTime ¶
func (ec *ExecutionContext) UpdateEndTime(time time.Time)
UpdateEndTime updates the execution context based on a platform.runtimeDone log message
func (*ExecutionContext) UpdateOutOfMemoryRequestID ¶
func (ec *ExecutionContext) UpdateOutOfMemoryRequestID(requestId string)
UpdateOutOfMemoryRequestID updates the execution context with the request ID if an out of memory is detected either in the function or platform.report logs
func (*ExecutionContext) UpdatePersistedStateFilePath ¶
func (ec *ExecutionContext) UpdatePersistedStateFilePath(path string)
UpdatePersistedStateFilePath sets the path of the persisted state file
func (*ExecutionContext) UpdateRuntime ¶
func (ec *ExecutionContext) UpdateRuntime(runtime string)
UpdateRuntime updates the execution context with the runtime information
func (*ExecutionContext) UpdateStartTime ¶
func (ec *ExecutionContext) UpdateStartTime(time time.Time)
UpdateStartTime updates the execution context based on a platform.Start log message
type State ¶
type State struct { ARN string LastRequestID string ColdstartRequestID string WasColdStart bool WasProactiveInit bool LastLogRequestID string LastOOMRequestID string Runtime string InitTime time.Time StartTime time.Time EndTime time.Time }
State represents the state of the execution context at a point in time