-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grpc: add support for LYB binary YANG data format
This commit updates the .proto file to allow instance data to be represented as either a string or binary data. This change is necessary because, in Rust, the `String` type cannot contain invalid UTF-8, which might be the case for LYB binary data. The introduction of the "oneof data" field increases complexity, as it introduces two possible fields to hold the data. However, this is necessary to support binary data. An alternative approach would be to use the "bytes" type exclusively for both text and binary data, but this would require clients to convert bytes to text (for XML and JSON), which can incur significant overhead in some languages. Performance tests indicate that using the LYB data format improves the holo-cli "show" commands' performance by approximately 30%. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
- Loading branch information
Showing
2 changed files
with
143 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters