-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat(go): embed jsii runtime application #2066
Conversation
Bundles the `@jsii/runtime` application within the go runtime library. This ships the necessary files as byte slices in `embeddedruntime.generated.go`. The `client` initializer will un-pack this into a temporary directory (cleaned up by `client.Close()`) and run that, unless the user specified the `JSII_RUNTIME` environment variable (in which case, that command is used instead). The `client` also assigns `JSII_AGENT` to a string representing the `go` stack version used during build (`runtime.Version()`), the operating system under which the application is running and the CPU architecture. The string is formatted as `VERSION/OS/ARCH`. A new `runtime.go` was introduced that manages a singleton `client` instance and exports a `Close` function that can be invoked to gracefully clean up the child process.
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.
Just a few small comments. Are we saying that this will partially replace #2046?
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
Bundles the
@jsii/runtime
application within the go runtime library.This ships the necessary files as byte slices in
embeddedruntime.generated.go
. Theclient
initializer will un-packthis into a temporary directory (cleaned up by
client.Close()
) and runthat, unless the user specified the
JSII_RUNTIME
environment variable(in which case, that command is used instead).
The
client
also assignsJSII_AGENT
to a string representing thego
stack version used during build (
runtime.Version()
), the operatingsystem under which the application is running and the CPU architecture.
The string is formatted as
VERSION/OS/ARCH
.A new
runtime.go
was introduced that manages a singletonclient
instance and exports a
Close
function that can be invoked togracefully clean up the child process.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.