配置consul
This commit is contained in:
@@ -58,13 +58,13 @@
|
||||
"TopicName": "kafkalog"
|
||||
},
|
||||
"ConsulClientOption": {
|
||||
"IP": "192.168.2.128",
|
||||
"IP": "118.195.191.41",
|
||||
"Port": "8500",
|
||||
"Datacenter": "dc1"
|
||||
},
|
||||
"ConsulRegisterOption": {
|
||||
"IP": "192.168.1.104",
|
||||
"Port": "7001",
|
||||
"IP": "183.216.18.15",
|
||||
"Port": "44329",
|
||||
"GroupName": "ApiMicroservice",
|
||||
"HealthCheckUrl": "/Health",
|
||||
"Interval": 10,
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
{
|
||||
var consulRegisterOption = Appsettings.app<ConsulRegisterOption>("ConsulRegisterOption");
|
||||
|
||||
var consulClientOption = Appsettings.app<ConsulClientOption>("ConsulRegisterOption");
|
||||
var consulClientOption = Appsettings.app<ConsulClientOption>("ConsulClientOption");
|
||||
using (ConsulClient client = new ConsulClient(c =>
|
||||
{
|
||||
c.Address = new Uri($"http://{consulClientOption.IP}:{consulClientOption.Port}/");
|
||||
|
||||
Reference in New Issue
Block a user