Skip to content

Commit 4234522

Browse files
committed
Update doc
1 parent d54c186 commit 4234522

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ kotlin {
7575

7676
There are two types of lambda functions:
7777

78-
**Buffered** Lambda function collects all the data it needs to return as a response before sending
78+
###Buffered
79+
Buffered Lambda function collects all the data it needs to return as a response before sending
7980
it back. This is a default behavior of Lambda function. Response payload max size: 6 MB.
8081

8182
```kotlin
@@ -95,7 +96,8 @@ class HelloWorldLambdaHandler : LambdaBufferedHandler<APIGatewayV2Request, APIGa
9596
}
9697
```
9798

98-
**Streaming** functions, on the other hand, sends back data as soon as it's available, rather than
99+
###Streaming
100+
Streaming function, on the other hand, sends back data as soon as it's available, rather than
99101
waiting for all the data to be ready. It processes and returns the response in chunks, piece by
100102
piece, which can be useful when you want to start delivering results right away, especially for
101103
large or ongoing tasks. This allows for faster responses and can handle data as it comes
@@ -122,7 +124,7 @@ class SampleStreamingHandler : LambdaStreamHandler<ByteArray, ByteWriteChannel>
122124
fun main() = LambdaRuntime.run { HelloWorldLambdaHandler() }
123125
```
124126

125-
For SampleStreamingHandler
127+
Or for SampleStreamingHandler
126128

127129
```kotlin
128130
fun main() = LambdaRuntime.run { SampleStreamingHandler() }
@@ -133,9 +135,9 @@ For more examples refer to project's sample.
133135

134136
## Testing Runtime locally
135137

136-
To run local runtime
138+
To run runtime
137139
locally [aws runtime emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator) is
138-
used:
140+
used. Here's how to run project's sample:
139141

140142
1. `./gradlew build` to build lambda executable
141143
2. Modify runtime-emulator/Dockerfile to set proper path to the generated executable (.kexe) file,
@@ -144,7 +146,6 @@ used:
144146
4. Start server `docker run -p 9000:8080 sample:latest`
145147
5. Execute function
146148
via `curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'`
147-
6. `docker ps; docker stop CONTAINER_ID` to stop the execution
148149

149150
## Build and deploy to AWS
150151

0 commit comments

Comments
 (0)