Open bacongobbler opened 4 years ago
@bacongobbler could you please elaborate on those questions:
Now the bigger question is, how this redirection should be implemented API-wise? Would the Wasm3 library user need to register read/write callbacks? Should they handle the
iovec
logic on their side, or should it be abstracted away?
We're considering to add ability to redirect IO, but would better understand the level of flexibility needed.
I.e. redirecting to a file descriptor is one thing, providing callbacks/hooks is different.
All of the infrastructure is in place for
kubectl logs
. We just need a way to hookoutput_writer
into the wasm3 runtime such that the output of the function call will be written to disk. Right now the output is only written to standard output.https://github.com/deislabs/krustlet-wasm3/blob/48f3cc182ff48be20e31b8fa18a6447c289f0b40/src/provider/runtime.rs#L94