Skip to content
New issue

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

refactor: Change Producer Interface to generalize initialization #163

Open
vmarchese opened this issue Aug 15, 2024 · 0 comments
Open

refactor: Change Producer Interface to generalize initialization #163

vmarchese opened this issue Aug 15, 2024 · 0 comments

Comments

@vmarchese
Copy link
Collaborator

The current interface is:

type Producer interface {
	Produce(k []byte, v []byte, o any)
	io.Closer
}

and it does not define an Initialize method.
However, every createXXX method in the emitter.go file, initializes the producer from a configuration file.

The Initialization should be independent from the configuration file but should initialize the Producer with a default Constructor (e.g.: producer.New(...) (Producer, error)
The actual configuration should be hidden in the Factory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant