File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,12 @@ public protocol OpenAPILambda: Sendable {
43
43
extension OpenAPILambda {
44
44
/// Returns the Lambda handler function for this OpenAPI Lambda implementation.
45
45
/// - Returns: A handler function that can be used with AWS Lambda Runtime
46
- @inlinable
47
46
public static func handler( ) throws -> @Sendable ( Event, LambdaContext) async throws -> Output {
48
47
try OpenAPILambdaHandler < Self > ( ) . handler
49
48
}
50
49
51
50
/// Run the Lambda handler function for this OpenAPI Lambda implementation with a custom logger, when one is given.
52
51
/// - Parameter logger: The logger to use for Lambda runtime logging
53
- @inlinable
54
52
public static func run( logger: Logger ? = nil ) async throws {
55
53
let lambdaRuntime :
56
54
LambdaRuntime <
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import OpenAPIRuntime
18
18
import HTTPTypes
19
19
20
20
/// Specialization of LambdaHandler which runs an OpenAPILambda
21
- public struct OpenAPILambdaHandler < L: OpenAPILambda > : Sendable {
21
+ struct OpenAPILambdaHandler < L: OpenAPILambda > : Sendable {
22
22
23
23
private let router : OpenAPILambdaRouter
24
24
private let transport : OpenAPILambdaTransport
@@ -35,7 +35,7 @@ public struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
35
35
/// Create application, set it up and create `OpenAPILambda` from application and create responder
36
36
/// - Parameters
37
37
/// - context: Lambda initialization context
38
- public init ( ) throws {
38
+ init ( ) throws {
39
39
self . router = TrieRouter ( )
40
40
self . transport = OpenAPILambdaTransport ( router: self . router)
41
41
self . lambda = try . init( transport: self . transport)
@@ -49,7 +49,7 @@ public struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
49
49
/// - context: Runtime ``LambdaContext``.
50
50
///
51
51
/// - Returns: A Lambda result ot type `Output`.
52
- public func handler( event: L . Event , context: LambdaContext ) async throws -> L . Output {
52
+ func handler( event: L . Event , context: LambdaContext ) async throws -> L . Output {
53
53
54
54
// by default returns HTTP 500
55
55
var lambdaResponse : OpenAPILambdaResponse = ( HTTPResponse ( status: . internalServerError) , " unknown error " )
You can’t perform that action at this time.
0 commit comments