The current pattern to handle errors in producers is:
if err != nil {
log.Fatal().Err(err).Msg("...")
}
This causes to the os.Exit(1) function to be called.
In the light of better modularization/plugins, producers should return a proper error to let the caller a chance to handle it.
This means that the current Producer interface should be amended to become:
type Producer interface {
Produce(ctx context.Context, k []byte, v []byte, o any) error
Close(ctx context.Context) error
}
Relates to #163
The current pattern to handle errors in producers is:
This causes to the
os.Exit(1)function to be called.In the light of better modularization/plugins, producers should return a proper error to let the caller a chance to handle it.
This means that the current
Producerinterface should be amended to become:Relates to #163