⍝? An error type that encapsulates the different errors that can occur fetching config unite ConfigError { ⍝? This indicates an error from an "upstream" config source. ⍝? As this could be almost _anything_ (such as Vault, Kubernetes ConfigMaps, KeyValue buckets, etc), ⍝? the error message is a string. #export("upstream") Upstream { value: utf8 }, ⍝? This indicates an error from an I/O operation. ⍝? As this could be almost _anything_ (such as a file read, network connection, etc), ⍝? the error message is a string. ⍝? Depending on how this ends up being consumed, ⍝? we may consider moving this to use the `wasi:io/error` type instead. ⍝? For simplicity right now in supporting multiple implementations, it is being left as a string. #export("io") Io { value: utf8 }, } ⍝? Gets a single opaque config value set at the given key if it exists #import("wasi:config/runtime", "get") micro get(key: utf8) -> Result?, ConfigError> { } ⍝? Gets a list of all set config data #import("wasi:config/runtime", "get-all") micro get_all() -> Result)>, ConfigError> { }