We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mongoConfig
...). Use just
gcs.GCSProducer
gcs.Producer
Producer
producer
createXXX
emitter.Emitter.Initialize
if
producerFactory["mongodb"].createProducer()
The text was updated successfully, but these errors were encountered:
@ugol In this branch
emitters
--xxxConfig
--producerConfig
In producers/factory.go there is an (unused for now) factory and the Producer interface. The Factory is filled with factory func by the init method that should go in every concrete impl (see https://github.com/ugol/jr/blob/161-refactor-cleanup-producer-code/pkg/producers/http/init.go for an example, unused for now) It is true that that best practices say that "Go interfaces generally belong in the package that uses values of the interface type, not the package that implements those values" but I believe that it depends on how you structure the code. If you move everything that is not "exportable" to internal and use the pkg to export producers than I think it is better to have a producers.Producer interface (like io.Closer) in a separate package the defines the behaviour (someone could use JR as a framework and just implement his own producer somewhere else. Moreover, if we leave the Producer interface in the emitter package the Factory must go there as well to avoid circular references
internal
pkg
producers.Producer
io.Closer
JR
emitter
See the crypto and the aes or cipher std packages for an example See also this
Sorry, something went wrong.
vmarchese
When branches are created from issues, their pull requests are automatically linked.
mongoConfig
, redisConfig...). Use just
--config`gcs.GCSProducer
ingcs.Producer
Producer
interface in theproducer
package for consistency and isolationcreateXXX
methodsemitter.Emitter.Initialize
sequence ofif
using factory with a producer factory mapproducerFactory["mongodb"].createProducer()
The text was updated successfully, but these errors were encountered: