@@ -35,12 +35,15 @@ To create a simple lambda function, follow the following steps:
35352 . Include library dependency into your module-level build.gradle file
3636```
3737kotlin {
38+ //..
3839 sourceSets {
3940 nativeMain.dependencies {
4041 implementation("io.github.trueangle:lambda-runtime:0.0.1")
4142 implementation("io.github.trueangle:lambda-events:0.0.1")
4243 }
4344 }
45+ //..
46+ }
4447```
45483 . Specify application entry point reference and supported targets
4649```
@@ -61,10 +64,11 @@ kotlin {
6164 //..
6265}
6366```
64- 4 . Choose lambda function type
67+ 4 . Choose lambda function type.
68+
6569There are two types of lambda functions:
6670
67- ### Buffered
71+ ** Buffered **
6872Buffered functions process incoming events by first collecting them
6973into a buffer before execution. This is a default behavior.
7074
@@ -82,7 +86,7 @@ class HelloWorldLambdaHandler : LambdaBufferedHandler<APIGatewayV2Request, APIGa
8286}
8387```
8488
85- ### Streaming
89+ ** Streaming **
8690Streaming functions, on the other hand, process events in real-time as they arrive, without any
8791intermediate buffering. This method is well-suited for use cases requiring immediate data
8892processing, such as real-time analytics or event-driven architectures where low-latency responses
@@ -96,6 +100,11 @@ class SampleStreamingHandler : LambdaStreamHandler<ByteArray, ByteWriteChannel>
96100}
97101```
98102
103+ 5 . Specify application entry point using standard ` main ` and ` LambdaRuntime.run ` functions
104+ ```
105+ fun main() = LambdaRuntime.run { HelloWorldLambdaHandler() } // or SampleStreamingHandler for streaming lambda
106+ ```
107+
99108## Testing Runtime locally
100109
101110To run local runtime
0 commit comments