Skip to content

Commit cf88ecf

Browse files
author
Sebastien Stormacq
committed
remove api breakage on LambdaContext.init()
1 parent 4ac9ab9 commit cf88ecf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Sources/AWSLambdaRuntime/LambdaContext.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,32 @@ public struct LambdaContext: CustomDebugStringConvertible, Sendable {
165165
self.storage.logger
166166
}
167167

168+
@available(
169+
*,
170+
deprecated,
171+
message:
172+
"This method will be removed in a future major version update. Use init(requestID:traceID:tenantID:invokedFunctionARN:deadline:cognitoIdentity:clientContext:logger) instead."
173+
)
174+
public init(
175+
requestID: String,
176+
traceID: String,
177+
invokedFunctionARN: String,
178+
deadline: LambdaClock.Instant,
179+
cognitoIdentity: String? = nil,
180+
clientContext: ClientContext? = nil,
181+
logger: Logger
182+
) {
183+
self.init(
184+
requestID: requestID,
185+
traceID: traceID,
186+
tenantID: nil,
187+
invokedFunctionARN: invokedFunctionARN,
188+
deadline: deadline,
189+
cognitoIdentity: cognitoIdentity,
190+
clientContext: clientContext,
191+
logger: logger
192+
)
193+
}
168194
public init(
169195
requestID: String,
170196
traceID: String,

0 commit comments

Comments
 (0)