小见

consul删除不需要的服务

电脑版发表于:2020/6/7 14:28

调用consul的api接口就行了

put请求:

http://consul服务地址/v1/agent/service/deregister/<serviceid>

serviceid可以在consul提供的地址看


使用.net的话可以使用HttpClient请求即可

string reuslt = httpClient.PutAsync("http://consul服务地址/v1/agent/service/deregister/3319478a............", null).Result.Content.ReadAsStringAsync().Result;


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢