New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Runtime API client #298
Conversation
Codecov Report
@@ Coverage Diff @@
## master #298 +/- ##
==========================================
+ Coverage 74.60% 77.66% +3.05%
==========================================
Files 13 17 +4
Lines 638 761 +123
==========================================
+ Hits 476 591 +115
+ Misses 123 116 -7
- Partials 39 54 +15
Continue to review full report at Codecov.
|
dummyPayload := `{"hello": "world"}` | ||
|
||
returnsBody := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
if r.Method != http.MethodGet || r.URL.Path != "/2018-06-01/runtime/invocation/next" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could re-use apiVersion
instead of 2018-06-01
Description of changes:
This change adds support for using the Lambda Runtime API. The effect of this, is that Lamdba Functions written in go, can be used with both the
go1.x
, andprovided
, runtimes.Why?
How to try it:
bootstrap
, or place a symlink to your binary named bootstrap within the .zipprovided
as the runtimeFunctions build this way are still compatible with the go1.x runtime. The RPC or the Runtime API mechanism will be detected on startup using environment variables Lambda defines by default.
I've also added a build flag, that allows disabling RPC support, which may result in slightly smaller binary sizes.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.