@@ -113,9 +113,9 @@ final actor NewLambdaRuntimeClient: LambdaRuntimeClientProtocol {
113113 return ( invocation, Writer ( runtimeClient: self ) )
114114
115115 case . waitingForNextInvocation,
116- . waitingForResponse,
117- . sendingResponse,
118- . sentResponse:
116+ . waitingForResponse,
117+ . sendingResponse,
118+ . sentResponse:
119119 fatalError ( " Invalid state: \( self . lambdaState) " )
120120 }
121121
@@ -219,7 +219,9 @@ final actor NewLambdaRuntimeClient: LambdaRuntimeClientProtocol {
219219 try channel. pipeline. syncOperations. addHandler (
220220 NIOHTTPClientResponseAggregator ( maxContentLength: 6 * 1024 * 1024 )
221221 )
222- try channel. pipeline. syncOperations. addHandler ( LambdaChannelHandler ( delegate: self , logger: self . logger) )
222+ try channel. pipeline. syncOperations. addHandler (
223+ LambdaChannelHandler ( delegate: self , logger: self . logger)
224+ )
223225 return channel. eventLoop. makeSucceededFuture ( ( ) )
224226 } catch {
225227 return channel. eventLoop. makeFailedFuture ( error)
@@ -230,7 +232,9 @@ final actor NewLambdaRuntimeClient: LambdaRuntimeClientProtocol {
230232 // connect directly via socket address to avoid happy eyeballs (perf)
231233 let address = try SocketAddress ( ipAddress: self . configuration. ip, port: self . configuration. port)
232234 let channel = try await bootstrap. connect ( to: address) . get ( )
233- let handler = try channel. pipeline. syncOperations. handler ( type: LambdaChannelHandler< NewLambdaRuntimeClient> . self )
235+ let handler = try channel. pipeline. syncOperations. handler (
236+ type: LambdaChannelHandler< NewLambdaRuntimeClient> . self
237+ )
234238 channel. closeFuture. whenComplete { result in
235239 self . eventLoop. preconditionInEventLoop ( )
236240 self . assumeIsolated { runtimeClient in
@@ -338,7 +342,11 @@ private final class LambdaChannelHandler<Delegate> {
338342 }
339343 }
340344
341- func reportError( isolation: isolated ( any Actor ) ? = #isolation, _ error: any Error , requestID: String ) async throws {
345+ func reportError(
346+ isolation: isolated ( any Actor ) ? = #isolation,
347+ _ error: any Error ,
348+ requestID: String
349+ ) async throws {
342350 switch self . state {
343351 case . connected( _, . waitingForNextInvocation) :
344352 fatalError ( " Invalid state: \( self . state) " )
@@ -376,7 +384,11 @@ private final class LambdaChannelHandler<Delegate> {
376384 }
377385 }
378386
379- func writeResponseBodyPart( isolation: isolated ( any Actor ) ? = #isolation, _ byteBuffer: ByteBuffer , requestID: String ) async throws {
387+ func writeResponseBodyPart(
388+ isolation: isolated ( any Actor ) ? = #isolation,
389+ _ byteBuffer: ByteBuffer ,
390+ requestID: String
391+ ) async throws {
380392 switch self . state {
381393 case . connected( _, . waitingForNextInvocation) :
382394 fatalError ( " Invalid state: \( self . state) " )
@@ -400,7 +412,11 @@ private final class LambdaChannelHandler<Delegate> {
400412 }
401413 }
402414
403- func finishResponseRequest( isolation: isolated ( any Actor ) ? = #isolation, finalData: ByteBuffer ? , requestID: String ) async throws {
415+ func finishResponseRequest(
416+ isolation: isolated ( any Actor ) ? = #isolation,
417+ finalData: ByteBuffer ? ,
418+ requestID: String
419+ ) async throws {
404420 switch self . state {
405421 case . connected( _, . idle) ,
406422 . connected( _, . waitingForNextInvocation) :
@@ -583,7 +599,9 @@ extension LambdaChannelHandler: ChannelInboundHandler {
583599 continuation. resume ( returning: Invocation ( metadata: metadata, event: response. body ?? ByteBuffer ( ) ) )
584600 } catch {
585601 self . state = . connected( context, . closing)
586- continuation. resume ( throwing: NewLambdaRuntimeError ( code: . invocationMissingMetadata, underlying: error) )
602+ continuation. resume (
603+ throwing: NewLambdaRuntimeError ( code: . invocationMissingMetadata, underlying: error)
604+ )
587605 }
588606
589607 case . connected( let context, . sentResponse( let continuation) ) :
0 commit comments