MCPcopy
hub / github.com/dgraph-io/dgraph / GetSink

Function GetSink

worker/sink_handler.go:48–56  ·  view source on GitHub ↗
(conf *z.SuperFlag)

Source from the content-addressed store, hash-verified

46)
47
48func 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.

Callers 1

newCDCFunction · 0.85

Calls 2

newKafkaSinkFunction · 0.85
newFileSinkFunction · 0.85

Tested by

no test coverage detected