()
| 111 | } |
| 112 | |
| 113 | func (this *Module) Run() error { |
| 114 | // this.logger.Printf("%s\tModule.Run()", this.Name()) |
| 115 | // 加载全部eBPF程序 |
| 116 | err := this.child.Start() |
| 117 | if err != nil { |
| 118 | return err |
| 119 | } |
| 120 | |
| 121 | // 不断检查是否有外部导致的终止,有则停止加载的模块并退出 |
| 122 | go func() { |
| 123 | this.run() |
| 124 | }() |
| 125 | |
| 126 | // 在一端不断接收readEvents所传递的数据 或许这样可以避免阻塞 |
| 127 | go func() { |
| 128 | this.processor.Serve() |
| 129 | }() |
| 130 | |
| 131 | // 不断读取内核传递过来的事件 |
| 132 | err = this.readEvents() |
| 133 | if err != nil { |
| 134 | return err |
| 135 | } |
| 136 | |
| 137 | return nil |
| 138 | } |
| 139 | func (this *Module) Stop() error { |
| 140 | return nil |
| 141 | } |
nothing calls this directly
no test coverage detected