Giter Club home page Giter Club logo

Comments (8)

edsiper avatar edsiper commented on May 13, 2024

the main reason of getting a reference to the input/output instance, is to be able to set properties or any other kind of future modification.

Note that when the end-user call flb_stop(ctx), the engine receives the message and it start releasing resources, internally it does an exit for all input/output instances associated to the main context.

The user never need to do an explicit release of the instances, all this happens in the background.

from fluent-bit.

nokute78 avatar nokute78 commented on May 13, 2024

Thank you for your comment.
I noticed that flb_ctx_t already contains plugin instances.

the main reason of getting a reference to the input/output instance, is to be able to set properties or any other kind of future modification.

So, why should we expose a plugin instance ?
User passes these instances to flb_*put_set as identifier.
I think structure of instance is not necessarily need, only identifier value is needed.

The user never need to do an explicit release of the instances, all this happens in the background.

I understand. But I think it is odd from user side.
Because flb_stop(ctx) doesn't contain plugin instances at first sight.
However this function influences plugin instances.
This means fluent-bit treats these instances as part of context implicitly.

So , I proposed that plugin instances should be hid from user and modify API.
flb_input_set( input_ins, ... ) -> flb_input_set( input_id, ctx, ... )

from fluent-bit.

edsiper avatar edsiper commented on May 13, 2024

I am thinking about this, no strong opinion yet, once I finish buffering/scheduling stuff I will focus on API and share more updates.

from fluent-bit.

nokute78 avatar nokute78 commented on May 13, 2024

I see, I'm waiting.
Thanks!

from fluent-bit.

edsiper avatar edsiper commented on May 13, 2024

I am reviewing this. I think it make sense to have an integer as identifier, thanks for pointing that.

from fluent-bit.

edsiper avatar edsiper commented on May 13, 2024

@nokute78 I have pushed the changes into api_ffd branch.

note: the remaining part are tests.

from fluent-bit.

edsiper avatar edsiper commented on May 13, 2024

I just migrated all tests/examples, changes rebased on master.

If is there anything pending or something not working as suggested please add your comments to this tickets.

from fluent-bit.

nokute78 avatar nokute78 commented on May 13, 2024

Amazing!! That's what I imagined!
Thanks.

from fluent-bit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.