Closed cosmo0920 closed 1 year ago
Using Golang plugin mechanism is quite reasonable. But, in this golang module ("github.com/fluent/fluent-bit-go/input"), we should keep it as very thin package. Providing another wrapper module is reasonable for me.
I think that package should be part of the bridge code. Since it uses CGO and shares memory with fluentbit.
Plugin authors should not have to import any code that includes CGO. As soon as you use CGO, you loose most of the golang goodies.
I mean, plugin authors can choose to import plugin bridge code something like "github.com/fluent/fluent-bit-go/bridge/input"
but this PR shouldn't include patches for bridging code. We should do it in another PR.
Already, output Golang plugin uses CGO included code.
We should unify the behavior and coding style for output and input modules.
Additionally, we should provide bridging code for simplifying to write Golang input plugin.
Note: A patch https://github.com/fluent/fluent-bit/pull/5056 to support golang input plugin was merged.
Yeah, we noticed that but current fluent-bit is pointed for 2.0 development. If we will merge this PR, we have to create 2.0 branch for now.
Hi guys, 2.0 version has been out for a while now, so please merge this PR, thank you.
thanks!
This PR can work with https://github.com/fluent/fluent-bit/pull/5056.
Signed-off-by: Hiroshi Hatake hatake@calyptia.com