fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
145 stars 33 forks source link

🎁 Populate nwritten_out when errors occur in config-store::get or dictionary::get #389

Closed elliottt closed 3 months ago

elliottt commented 3 months ago

The wiggle representation of a function that returns Result<u32, FastlyStatus> and one that takes a u32 outparam as its last argument and returns Result<(), FastlyStatus> are the same, which means that we can support communicating the length needed to resolve a FastlyStatus::BufferLen error without changing the abi of fastly_config_store::get or fastly_dictionary::get.

This PR makes this change to both fastly_config_store::get and fastly_dictionary::get, allowing SDKs to better adapt when buffer-length errors occur.