Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State uint32
State is used to convey the state of a host module function call. Given that a host function will generally do something the wasm module cannot do, it will likely do some sort of IO. This means that the call can either succeed or fail with some error. This allows us to interpret the returned memory buffer as either containing a value or an error.
State is a uint32 allowing us to define well-known generic errors that packages can use to express semantic meaning. It is not exhaustive. As new use cases are added, we can add new semantic errors.
Currently the only host function we expose is k8s.Lookup, this means means the host function can set any of the below states and the k8s package can use them to return meaningful error types to the user that they can in turn act upon.