Skip to content

Commit 970f751

Browse files
committed
update docs
1 parent 088625d commit 970f751

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

events/lambda_function_urls.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,20 @@ type LambdaFunctionURLResponse struct {
6868
Cookies []string `json:"cookies"`
6969
}
7070

71-
// LambdaFunctionURLStreamingResponse models the response to a Lambda Function URL
72-
// used when MODE is TBD
73-
// If the MODE of the Function URL is TBD, use LambdaFunctionURLResponse instead
71+
// LambdaFunctionURLStreamingResponse models the response to a Lambda Function URL when InvokeMode is RESPONSE_STREAM.
72+
// If the InvokeMode of the Function URL is BUFFERED (default), use LambdaFunctionURLResponse instead.
7473
//
75-
// example:
76-
//
77-
// lambda.Start(func(LambdaFunctionURL) (*events.LambdaFunctionURLStreamingResponse, error) {
78-
// return *LambdaFunctionURLStreamingResponse{
74+
// Example:
7975
//
76+
// lambda.Start(func() (*events.LambdaFunctionURLStreamingResponse, error) {
77+
// return &events.LambdaFunctionURLStreamingResponse{
78+
// StatusCode: 200,
79+
// Headers: map[string]string{
80+
// "Content-Type": "text/html",
81+
// },
82+
// Body: strings.NewReader("<html><body>Hello World!</body></html>"),
8083
// }, nil
81-
// })
84+
// })
8285
type LambdaFunctionURLStreamingResponse struct {
8386
prelude *bytes.Buffer
8487

0 commit comments

Comments
 (0)