Tags: airbnb/viaduct
Tags
EngineObjectData changes This PR has two changes (each in its own commit): The first adds the interface `EngineObjectData.Sync`, a subtype of `EngineObjectData` that includes synchronous getters and setters. It also updates `ResolvedEngineObjectData` (and a few other impls of EOD) to use this new interface. Finally, the default data fetcher in `ViaductWiringFactory` is modified to look for an use this interface -- rather than look for `ResolvedEngineObjectData` and extract its `data` property -- when it optimizes for the synchronous case. This is a more encapsulated way to support synchrnous EODs. The second changes adds the function `EngineObjectData.fetchSelections`, which returns an `Iterable<String>` of the selections available on the current object. The intended use of this function is to build bindings into languages that do not support Kotlin's suspending functions: before calling into such languages, in Kotlin we can use this method to (recursively) convert and EOD into something easier for another language to process (eg, a `Map<String, Any?>`). Github-Change-Id: 945946 GitOrigin-RevId: 2bc03dc40a10017e47a39994e08748728aedbf4a