当前位置:网站首页>Principle of sentinel integrating Nacos to update data dynamically
Principle of sentinel integrating Nacos to update data dynamically
2022-04-23 08:04:00 【Dream river dream】
1) Dynamic data source top-level interface
- loadConfig Method : Return target data , It should be sentinel Various rule objects needed ;
- readSource Method : Return source data , It is usually a string type or byte type , Then it is parsed into the target data type above , It can be inferred that this method is the focus of implementation ;
- getProperty Method : Get the binding with the current data source SentinelProperty, It can be seen that it is related to the target data ;
- summary : The whole process is 2->1->3 The order of
2) Top level abstract class
Contains a data converter , Convert source data to target data , and SentinelProperty Implementation class of DynamicSentinelProperty
3)Nacos data source 、 Rewrite the readSource Method 、 Initialization data
- according to nacos Configuration center API Return source data ;
- call getProperty().updateValue(newValue) Update data ;
4)SentinelProperty Top level interface
- updateValue The method is the point , Will be notified one by one PropertyListener Update data , call PropertyListener Of configLoad Method ;
- addListener Called when PropertyListener Of configUpdate Method ;
5) On flow control rules FlowPropertyListener
6)sentinel Flow control processor FlowSlot
- Will eventually call FlowRuleManager Of getRules Method to obtain flow control rules ,FlowRuleManager Inner class FlowPropertyListener It is PropertyListener Implementation class of interface , This connects the whole process
版权声明
本文为[Dream river dream]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230629086404.html
边栏推荐
- 学fpga(从verilog到hls)
- Research on software security based on NLP (I)
- 【编程实践/嵌入式比赛】嵌入式比赛学习记录(一):TCP服务器和web界面的建立
- Unity C single case mode learning review notes
- 输入 “ net start mysql ”,出现 “ 发生系统错误 5。 拒绝访问 ” 。问题详解
- KVM安装部署
- GUI,CLI与Unix哲学
- Interview learning route
- Talk about the essence of interface idempotent and consumption idempotent
- VBA calls SAP RFC to read & write data
猜你喜欢
Using lambda expression to solve the problem of C file name sorting (whether it is 100 or 11)
输入 “ net start mysql ”,出现 “ 发生系统错误 5。 拒绝访问 ” 。问题详解
Intranet penetration series: dns2tcp of Intranet tunnel
Chapter VII asset impairment
Go语学习笔记 - 异常处理 | 从零开始Go语言
Buuctf misc brush questions
Redis--为什么字符串emstr的字符串长度是44字节上限?
内网渗透系列:内网隧道之dnscat2
Cloud computing skills competition -- Part 2 of openstack private cloud environment
Redis -- why is the string length of string emstr the upper limit of 44 bytes?
随机推荐
SAP Query增强开发介绍
Redis事务实现乐观锁原理
Internal network security attack and defense: a practical guide to penetration testing (5): analysis and defense of horizontal movement in the domain
内网渗透系列:内网隧道之icmp_tran
BUFFCTF文件中的秘密1
《内网安全攻防:渗透测试实战指南》读书笔记(八):权限维持分析及防御
Chapter IV intangible assets
第四章 无形资产
Redis -- why is the string length of string emstr the upper limit of 44 bytes?
【编程实践/嵌入式比赛】嵌入式比赛学习记录(二):基于TCP的图片流传输
Simplify exporting to SVG data files and all images in SVG folder
When using flash, the code ends automatically without an error, the connection cannot be maintained, and the URL cannot be accessed.
Research on software security based on NLP (2)
How to present your digital portfolio: suggestions from creative recruiters
What's new in. Net 5 NET 5
STO With Billing 跨公司库存转储退货
Talk about the essence of interface idempotent and consumption idempotent
内网渗透系列:内网隧道之dnscat2
Complete color conversion formulas and conversion tables (31 kinds)
KVM安装部署