Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Sink Client Typing #849

Merged
merged 28 commits into from
Aug 26, 2024
Merged

File Sink Client Typing #849

merged 28 commits into from
Aug 26, 2024

Commits on Aug 19, 2024

  1. make file sink parts declare their type

    Instead of dealing with bundles of Vec<u8> each file sink and client
    will be paired over any type that can be turned into bytes.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    420648a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc66e79 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    48f37f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d0399a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    be57669 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    91418ff View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ea033cf View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ada8975 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    edcb89c View commit details
    Browse the repository at this point in the history
  10. Rename trait FileStoreAsBytes -> MsgBytes to follow convention for pr…

    …ost traits
    
    To keep from dealing with Vec<u8> and String auto implementations for
    prost::Message that disallows using a file sync with anything but a
    prost::Message.
    
    We're going to follow the other Msg* trait conventions where we
    implement them only for the types we are using.
    
    This allows someone to make a file sync for whatever type they may have,
    and convenience for proto types we write reports about.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    8b1294c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    990fd46 View commit details
    Browse the repository at this point in the history
  12. rename file sink trait to writer

    The abstraction comes in two parts.
    
    The first we can get a file sink from a type if it implements the
    FileSinkWrite trait.
    
    The second is a type being able to be written to a file sink if it can
    be turned into bytes.
    
    This separates the convenience from the actual functionality.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    2b916a6 View commit details
    Browse the repository at this point in the history
  13. file sink metric from static str to String

    this allows us to attach the metric name to the file type
    implementation, and only have to pass in the calling crate for the
    prefix.
    
    FileSinks are really only created once, and there are not so many of
    them that owning a string introduces a crazy amount of overhead.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4e90746 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ae81c48 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    02f422c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    da58d2a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    94c5d28 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    61bd7a1 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a18218c View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    758bb18 View commit details
    Browse the repository at this point in the history
  21. move MsgBytes trait back out of FileSinkWrite

    The FileSinkWrite trait is a convenience method for creating file sinks,
    but it should not be tied to being able to use a file sink. The only
    requirement for that is being able to turn your message into bytes.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    8fbd2f5 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e17ed62 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    a59351f View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9457e98 View commit details
    Browse the repository at this point in the history
  25. combine auto_commit and roll_time into 1 argument

    This is a specialized helper function, every crate using it was only
    using these two options. We can provide the base functionality with a
    single option.
    
    Ideally the Builder would be updated to take some sort of enum for the
    commit type as it doesn't make a lot of sense to auto_commit on every
    write _and_ roll the file at a certain interval.
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    5e216b6 View commit details
    Browse the repository at this point in the history
  26. fixup after rebase

    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    68d9a1c View commit details
    Browse the repository at this point in the history
  27. fixup after rebase

    - include new verified mapper code
    - update deps
    - fix botched rebase conflicts
    michaeldjeffrey committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    b5bbad4 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. uncouple FileSinkWriteExt from FileType enum

    Taking a static string allows FileSinkWriteExt to be implemented by
    users outside the oracles codebase, and starts the journey of moving
    away from the FileType enum.
    michaeldjeffrey committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    a5fe861 View commit details
    Browse the repository at this point in the history