package app import ( "dataSource/kafka" "log" ) func init() { log.SetFlags(log.LstdFlags | log.Lshortfile | log.Lmicroseconds) } func Start() { // 启动 master 服务 master := NewEtMaster() go master.RegisterListen() //等待node注册 master.WaitNodeRegister() println("=======") // -> 源数据 kafkaDataSource := kafka.NewKafkaDataSource() go kafkaDataSource.Producer() // 将源数据 -> 各类型节点处理 master.DistributeData(kafkaDataSource.DataChannels) }