You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
重构
Discovery 和 Engine 的重构思路
Discovery 和 Engine从本质上来说其实都是一个list-watch模型。不同的是,Discovery watch的数据源一般是注册中心如zk,nacos等,而Engine watch的一般是应用运行引擎如kubernetes,docker compose, vm等。kubernetes中提供了client-go来抽象并实现了list watch这个机制:

我们可以将admin中的一些组件映射到上面这张图,Indexer和Store和上图中的组件的定位一模一样,从接口上来说,可以完全复用:
而Discovery和Engine从定位上则包含了Reflector,Queue,Informer这几个组件,即包含了从指定数据源进行ListWatch,队列缓冲,事件分发,再调用Indexer完成持久化这一过程
任务表
Beta Was this translation helpful? Give feedback.
All reactions