(conf *z.SuperFlag)
| 46 | ) |
| 47 | |
| 48 | func GetSink(conf *z.SuperFlag) (Sink, error) { |
| 49 | switch { |
| 50 | case conf.GetString("kafka") != "": |
| 51 | return newKafkaSink(conf) |
| 52 | case conf.GetPath("file") != "": |
| 53 | return newFileSink(conf) |
| 54 | } |
| 55 | return nil, errors.New("sink config is not provided") |
| 56 | } |
| 57 | |
| 58 | // Kafka client is not concurrency safe. |
| 59 | // Its the responsibility of callee to manage the concurrency. |
no test coverage detected