@@ -19,7 +19,7 @@ import NIOCore
1919/// `LambdaRuntime` manages the Lambda process lifecycle.
2020///
2121/// Use this API, if you build a higher level web framework which shall be able to run inside the Lambda environment.
22- public final class LambdaRuntime < Handler: NonInitializingByteBufferLambdaHandler > {
22+ public final class LambdaRuntime < Handler: LambdaRuntimeHandler > {
2323 private let eventLoop : EventLoop
2424 private let shutdownPromise : EventLoopPromise < Int >
2525 private let logger : Logger
@@ -37,7 +37,7 @@ public final class LambdaRuntime<Handler: NonInitializingByteBufferLambdaHandler
3737 /// Create a new `LambdaRuntime`.
3838 ///
3939 /// - parameters:
40- /// - handlerProvider: A provider of the ``ByteBufferLambdaHandler`` the `LambdaRuntime` will manage.
40+ /// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
4141 /// - eventLoop: An `EventLoop` to run the Lambda on.
4242 /// - logger: A `Logger` to log the Lambda events.
4343 @usableFromInline
@@ -57,7 +57,7 @@ public final class LambdaRuntime<Handler: NonInitializingByteBufferLambdaHandler
5757 /// Create a new `LambdaRuntime`.
5858 ///
5959 /// - parameters:
60- /// - handlerProvider: A provider of the ``ByteBufferLambdaHandler`` the `LambdaRuntime` will manage.
60+ /// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
6161 /// - eventLoop: An `EventLoop` to run the Lambda on.
6262 /// - logger: A `Logger` to log the Lambda events.
6363 init (
@@ -200,7 +200,7 @@ public final class LambdaRuntime<Handler: NonInitializingByteBufferLambdaHandler
200200 private enum State {
201201 case idle
202202 case initializing
203- case active( LambdaRunner , any NonInitializingByteBufferLambdaHandler )
203+ case active( LambdaRunner , any LambdaRuntimeHandler )
204204 case shuttingdown
205205 case shutdown
206206
@@ -252,7 +252,7 @@ public enum LambdaRuntimeFactory {
252252 _ handlerType: Handler . Type ,
253253 eventLoop: any EventLoop ,
254254 logger: Logger
255- ) -> LambdaRuntime < some NonInitializingByteBufferLambdaHandler > {
255+ ) -> LambdaRuntime < some LambdaRuntimeHandler > {
256256 LambdaRuntime< CodableLambdaHandler< Handler>>(
257257 handlerProvider: CodableLambdaHandler< Handler> . makeHandler( context: ) ,
258258 eventLoop: eventLoop,
@@ -271,7 +271,7 @@ public enum LambdaRuntimeFactory {
271271 _ handlerType: Handler . Type ,
272272 eventLoop: any EventLoop ,
273273 logger: Logger
274- ) -> LambdaRuntime < some NonInitializingByteBufferLambdaHandler > {
274+ ) -> LambdaRuntime < some LambdaRuntimeHandler > {
275275 LambdaRuntime< CodableEventLoopLambdaHandler< Handler>>(
276276 handlerProvider: CodableEventLoopLambdaHandler< Handler> . makeHandler( context: ) ,
277277 eventLoop: eventLoop,
@@ -290,7 +290,7 @@ public enum LambdaRuntimeFactory {
290290 _ handlerType: Handler . Type ,
291291 eventLoop: any EventLoop ,
292292 logger: Logger
293- ) -> LambdaRuntime < some NonInitializingByteBufferLambdaHandler > {
293+ ) -> LambdaRuntime < some LambdaRuntimeHandler > {
294294 LambdaRuntime < Handler > (
295295 handlerProvider: Handler . makeHandler ( context: ) ,
296296 eventLoop: eventLoop,
@@ -301,11 +301,11 @@ public enum LambdaRuntimeFactory {
301301 /// Create a new `LambdaRuntime`.
302302 ///
303303 /// - parameters:
304- /// - handlerProvider: A provider of the ``CoreByteBufferLambdaHandler`` the `LambdaRuntime` will manage.
304+ /// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
305305 /// - eventLoop: An `EventLoop` to run the Lambda on.
306306 /// - logger: A `Logger` to log the Lambda events.
307307 @inlinable
308- public static func makeRuntime< Handler: NonInitializingByteBufferLambdaHandler > (
308+ public static func makeRuntime< Handler: LambdaRuntimeHandler > (
309309 handlerProvider: @escaping ( LambdaInitializationContext ) -> EventLoopFuture < Handler > ,
310310 eventLoop: any EventLoop ,
311311 logger: Logger
@@ -320,16 +320,16 @@ public enum LambdaRuntimeFactory {
320320 /// Create a new `LambdaRuntime`.
321321 ///
322322 /// - parameters:
323- /// - handlerProvider: A provider of the ``CoreByteBufferLambdaHandler`` the `LambdaRuntime` will manage.
323+ /// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
324324 /// - eventLoop: An `EventLoop` to run the Lambda on.
325325 /// - logger: A `Logger` to log the Lambda events.
326326 @inlinable
327- public static func makeRuntime< Handler: NonInitializingByteBufferLambdaHandler > (
327+ public static func makeRuntime< Handler: LambdaRuntimeHandler > (
328328 handlerProvider: @escaping ( LambdaInitializationContext ) async throws -> Handler ,
329329 eventLoop: any EventLoop ,
330330 logger: Logger
331331 ) -> LambdaRuntime < Handler > {
332- return LambdaRuntime (
332+ LambdaRuntime (
333333 handlerProvider: { context in
334334 let promise = eventLoop. makePromise ( of: Handler . self)
335335 promise. completeWithTask {
0 commit comments