deislabs / krustlet-wasm3

Krustlet provider for the wasm3 runtime.
MIT License
18 stars 4 forks source link

implement `kubectl logs` #1

Open bacongobbler opened 4 years ago

bacongobbler commented 4 years ago

All of the infrastructure is in place for kubectl logs. We just need a way to hook output_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

bacongobbler commented 4 years ago

https://github.com/wasm3/wasm3/issues/147

vshymanskyy commented 3 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.

vshymanskyy commented 3 years ago

I.e. redirecting to a file descriptor is one thing, providing callbacks/hooks is different.