Skip to content

Commit 6dbb75d

Browse files
committed
Tidy docs
1 parent 5217701 commit 6dbb75d

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

await_shutdown.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ func awaitShutdown(extensionClient *extensionsapi.Client, ctx context.Context) (
2222
if err != nil {
2323
return "", errors.WithMessage(err, "failed to get next event")
2424
}
25-
26-
// Exit if we receive a SHUTDOWN event
2725
if res.EventType == extensionsapi.Shutdown {
2826
return "received shutdown event", nil
2927
}

extensionsapi/client.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
// SPDX-License-Identifier: MIT-0
3-
41
package extensionsapi
52

63
import (
@@ -16,7 +13,6 @@ type Client struct {
1613
ExtensionID string
1714
}
1815

19-
// NewClient returns a Lambda Extensions API client
2016
func NewClient() *Client {
2117
return &Client{
2218
extensionsApiUrl: fmt.Sprintf("http://%s/2020-01-01/extension", os.Getenv("AWS_LAMBDA_RUNTIME_API")),

extensionsapi/register.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ import (
1414
type EventType string
1515

1616
const (
17-
// Invoke is a lambda invoke
18-
Invoke EventType = "INVOKE"
19-
20-
// Shutdown is a shutdown event for the environment
21-
Shutdown EventType = "SHUTDOWN"
17+
Invoke EventType = "INVOKE" // a lambda invoke
18+
Shutdown EventType = "SHUTDOWN" // shutdown event for the environment
2219

2320
extensionNameHeader = "Lambda-Extension-Name"
2421
extensionIdentiferHeader = "Lambda-Extension-Identifier"

main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
// SPDX-License-Identifier: MIT-0
3-
41
package main
52

63
import (
@@ -35,6 +32,7 @@ func main() {
3532
panic(err)
3633
}
3734

35+
// Create a logsApiClient & remember to shut it down when we're done
3836
logsApiClient, err := initLogsApiClient(logsapi.Options{
3937
ExtensionID: extensionClient.ExtensionID,
4038
LogServerAddress: "sandbox:1234",

0 commit comments

Comments
 (0)