Skip to content

refactor: Change Producer Interface to generalize initialization #163

@vmarchese

Description

@vmarchese

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions