Package init contains the harness initialization code defined by the FnAPI. It is a separate package to avoid flags in the harness package and must be imported by the runner to ensure the init hook is registered.
const ( // Terminate means the hook should exit itself when the worker harness returns. Terminate exitMode = iota // Return means that the hook should return out, and allow the calling code to // determine if and when the process exits. // This may cause errors that caused worker failure to be ignored. Return )
var ( // ShutdownMode allows the runner to set how the worker harness should exit. ShutdownMode = Terminate )