fluent / fluent-bit-go

Fluent Bit Golang package to build plugins
Apache License 2.0
189 stars 52 forks source link

FLBPluginFlushCtx and FLBPluginFlush what's the difference between these two functions #37

Closed ZP-AlwaysWin closed 4 years ago

ZP-AlwaysWin commented 4 years ago

FLBPluginFlushCtx and FLBPluginFlush what's the difference between these two functions?

When are the two functions called? If both functions exist in a plug-in, what is their calling relationship

PettitWesley commented 4 years ago

FLBPluginFlushCtx is called if both are defined. Only one will be called. They both serve the same purpose, they just have different signatures. FLBPluginFlushCtx takes a context argument that lets you store state between invocations.

ZP-AlwaysWin commented 4 years ago

FLBPluginFlushCtx is called if both are defined. Only one will be called. They both serve the same purpose, they just have different signatures. FLBPluginFlushCtx takes a context argument that lets you store state between invocations.

ok,Thanks PettitWesley~

ZP-AlwaysWin commented 4 years ago

/close