aws / aws/aws-lambda-go

Please export extensionAPIClient

Offen
#562 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Go
Sterne
3.8k
Forks
578
Ø Merge
8 Std. 18 Min.
Gemergte PRs (30 T.)
1

Beschreibung

**Is your feature request related to a problem? Please describe.**
Occasionally would like to write a small Lambda extension to do some processing after my main Lambda handler has returned a response. While the requirements for implementing an extension are well-documented, there's no official 1st-party public Go package to help with implementation.

**Describe the solution you'd like**
`package lambda` already has implemented an extension client, but it is unexported. I'd like to be able to create a new extension client by calling some constructor `NewExtensionAPIClient` (which could be in `package lambda` or in some other package), register event types I'm interested in, and define an extension event handler.

It seems to me that this would not add much maintenance burden since the extension client is already implemented for the sake of the `WithEnableSIGTERM` option. The difference here would be supporting the exported API for the extension client.

**Describe alternatives you've considered**
I could implement and maintain an extension API client myself; but the same is true for implementing a runtime API client. I'd rather rely on an officially supported implementation.

I could find a 3rd-party implementation, but since there's no single or few 3rd-party implementations that have gained community consensus, I don't have any assurances about the quality of the implementation.

---

I'd like to express my thanks to those maintaining this repository. I use it a lot, and I appreciate your work.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne im package lambda, indem du den bestehenden nicht exportierten Extension-Client lokalisierst, der von WithEnableSIGTERM verwendet wird, und vergleiche anschließend seine unterstützten Operationen mit der Dokumentation der Lambda Extensions API. Erledigt ist die Aufgabe, wenn Extension-Autoren einen offiziellen öffentlichen Go-Client mit dem im Issue beschriebenen Ablauf für Konstruktor, Ereignisregistrierung und Handler verwenden können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go
Bereich
api, cloud
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.