Skip to main content

gateway_from_kvs

Function gateway_from_kvs 

Source
fn gateway_from_kvs(
    prefix: &str,
    kvs: Vec<(String, Vec<u8>)>,
) -> Result<GatewayConfig, String>
Expand description

Assembles a GatewayConfig from the etcd key/value pairs under prefix.

Keys are <prefix>/{routes,policies,consumers}/<name>; values are the resource JSON. Unknown key shapes are skipped. Malformed resource JSON is an error (so a bad write surfaces rather than silently dropping config).