-
Hi there, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
We don't package or distribute it that way, but I don't see why not. We bundle the memory calculator and some other "helpers" into a single Go binary that gets installed into containers generated by Paketo Buildpacks. You can see the code here, where we're bundling this into the binary, https://github.com/paketo-buildpacks/libjvm/blob/main/cmd/helper/main.go#L45-L50. There are other helpers you could include, but you don't have to. The binary just needs to run before your application. With buildpacks, that happens automatically, but you could do something like Essentially, if there is a problem the binary will fail so your app will fail to start. When successful, the binary sets values in the env variable |
Beta Was this translation helpful? Give feedback.
The cmd/helper/main.go will run all of our helpers. For efficiency, they get compiled into one binary and run all in one execution. Some helpers will no-op, depending on their criteria for actually doing something. For example, some only run for pre-Java 9, and some only run post-Java 9.
You can modify the source code & recompile the helper binary to include any set of helpers you want to run. If you wanted to trigger specific helpers based on input arguments, you could do that but the present binary does not work that way.