Skip to content

Use known context to close/open stream, question and possible change in v3.1 onward #29

@walkiry

Description

@walkiry

Hi,
I am considering using the library, however, I am spotting some design choices that I do not understand regarding the open/close packet.

As I understand the packets are closed by the function when the barectf engine is call the callbacks. I understand why you let the user call the function that actually closes the stream's packet.

However, I do not understand why would you use a stream's specific function ( e.g barectf_my_stream_close_packet) rather than a generic function to allow an easy re-usability (e.g close_stream_packet(ctx)). The context holds all the information necessary for this to be possible.

And even better. To allow the same trace to share the callbacks, why not create a barectf ctx and attach all the different streams to it? So we could gain even more re-usability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions