classify_event: Classify an event based on how it is invoked

View source: R/start-listening.R

classify_eventR Documentation

Classify an event based on how it is invoked

Description

Events need to be handled differently depending on how the Lambda is invoked. For example, an event via an API Gateway needs to be parsed and handled differently to that of an event received via direct invocation. This function attempts to detect the method of invocation and returns a character vector which can be used to assign an S3 class to the event. The last element of the vector is always "event".

Usage

classify_event(event_content)

Arguments

event_content

the content of the response received from querying the text invocation endpoint, as a character

Value

character vector, the last element of which is always "event"


lambdr documentation built on Nov. 25, 2023, 5:08 p.m.