Skip to content

Commit 04f722d

Browse files
committed
Documentation fixes
1 parent 031ee46 commit 04f722d

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

+2-6
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public protocol SimpleLambdaHandler {
4848
/// - parameters:
4949
/// - value: Response of type ``Output``.
5050
/// - buffer: A `ByteBuffer` to encode into, will be overwritten.
51-
///
52-
/// - Returns: A `ByteBuffer` with the encoded version of the `value`.
5351
func encode(value: Output, into buffer: inout ByteBuffer) throws
5452

5553
/// Decode a `ByteBuffer` to a request or event of type ``Event``.
@@ -170,8 +168,6 @@ public protocol LambdaHandler {
170168
/// - parameters:
171169
/// - value: Response of type ``Output``.
172170
/// - buffer: A `ByteBuffer` to encode into, will be overwritten.
173-
///
174-
/// - Returns: A `ByteBuffer` with the encoded version of the `value`.
175171
func encode(value: Output, into buffer: inout ByteBuffer) throws
176172

177173
/// Decode a `ByteBuffer` to a request or event of type ``Event``.
@@ -411,8 +407,8 @@ public protocol ByteBufferLambdaHandler: LambdaRuntimeHandler {
411407
/// Concrete Lambda handlers implement this method to provide the Lambda functionality.
412408
///
413409
/// - parameters:
410+
/// - buffer: The event or input payload encoded as `ByteBuffer`.
414411
/// - context: Runtime ``LambdaContext``.
415-
/// - event: The event or input payload encoded as `ByteBuffer`.
416412
///
417413
/// - Returns: An `EventLoopFuture` to report the result of the Lambda back to the runtime engine.
418414
/// The `EventLoopFuture` should be completed with either a response encoded as `ByteBuffer` or an `Error`.
@@ -447,8 +443,8 @@ public protocol LambdaRuntimeHandler {
447443
/// Concrete Lambda handlers implement this method to provide the Lambda functionality.
448444
///
449445
/// - parameters:
446+
/// - buffer: The event or input payload encoded as `ByteBuffer`.
450447
/// - context: Runtime ``LambdaContext``.
451-
/// - event: The event or input payload encoded as `ByteBuffer`.
452448
///
453449
/// - Returns: An `EventLoopFuture` to report the result of the Lambda back to the runtime engine.
454450
/// The `EventLoopFuture` should be completed with either a response encoded as `ByteBuffer` or an `Error`.

Sources/AWSLambdaRuntimeCore/LambdaRuntime.swift

+5-4
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ public final class LambdaRuntime<Handler: LambdaRuntimeHandler> {
164164
if self.configuration.lifecycle.maxTimes > 0, count >= self.configuration.lifecycle.maxTimes {
165165
return promise.succeed(count)
166166
}
167-
var logger = self.logger
168-
logger[metadataKey: "lifecycleIteration"] = "\(count)"
167+
var mlogger = self.logger
168+
mlogger[metadataKey: "lifecycleIteration"] = "\(count)"
169+
let logger = mlogger
169170
runner.run(handler: handler, logger: logger).whenComplete { result in
170171
switch result {
171172
case .success:
@@ -301,7 +302,7 @@ public enum LambdaRuntimeFactory {
301302
/// Create a new `LambdaRuntime`.
302303
///
303304
/// - parameters:
304-
/// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
305+
/// - handlerProvider: A provider of the ``LambdaRuntimeHandler`` the `LambdaRuntime` will manage.
305306
/// - eventLoop: An `EventLoop` to run the Lambda on.
306307
/// - logger: A `Logger` to log the Lambda events.
307308
@inlinable
@@ -320,7 +321,7 @@ public enum LambdaRuntimeFactory {
320321
/// Create a new `LambdaRuntime`.
321322
///
322323
/// - parameters:
323-
/// - handlerProvider: A provider of the ``Handler`` the `LambdaRuntime` will manage.
324+
/// - handlerProvider: A provider of the ``LambdaRuntimeHandler`` the `LambdaRuntime` will manage.
324325
/// - eventLoop: An `EventLoop` to run the Lambda on.
325326
/// - logger: A `Logger` to log the Lambda events.
326327
@inlinable

0 commit comments

Comments
 (0)