Draft: re-organize things in re_log_encoding #8797
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a heavy draft (things compile, but tons of broken link complaints), I spent some times re-organizing things so that everything related to
rrd
encoding ends up in the relevant module. This than ensures we only need to make the public interface actually public through relevant module exports. There's no new code, no publicly exposed functions were renamed (to confine the changes as much as possible to just this package, but things were moved around heavily.To make sense of things, perhaps worth looking into
lib.rs
and what gets exposed and how.We can drop this on the floor if we think it's not worth doing or doesn't make sense. My motivation was to not publicly expose guts of rrd protocol just because of module organization, but maybe it only makes sense to me.
Brief summary of changes:
codec
module. We already hadfile
andwire
there, but now we haverrd
andwire
codec
errors now, same asCompression
,VersionPolicy
, etccodec/rrd/encoder
andcodec/rrd/decoder
and publicly exported to match the previous public exportencode
for the previously public function andencode
that is internally used. privateencode
is nowencode_msg