Validate method validates WriterConfig properties.
()
| 334 | |
| 335 | // Validate method validates WriterConfig properties. |
| 336 | func (config *WriterConfig) Validate() error { |
| 337 | if len(config.Brokers) == 0 { |
| 338 | return errors.New("cannot create a kafka writer with an empty list of brokers") |
| 339 | } |
| 340 | return nil |
| 341 | } |
| 342 | |
| 343 | // WriterStats is a data structure returned by a call to Writer.Stats that |
| 344 | // exposes details about the behavior of the writer. |