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;