et-go 20240919重建
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
488 B

1 month ago
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)
}