in client/Apache.ShenYu.Client/Registers/ShenyuConsulRegister.cs [45:58]
public override Task Init(ShenyuOptions shenyuOptions)
{
if (string.IsNullOrEmpty(shenyuOptions.Register.ServerList))
{
throw new System.ArgumentException("serverList can not be null.");
}
this._shenyuOptions = shenyuOptions;
ConsulClientConfiguration config = new ConsulClientConfiguration();
config.Address = new Uri(this._shenyuOptions.Register.ServerList);
config.Token = shenyuOptions.Register.Props.GetValueOrDefault(RegisterConstants.Token, "");
this._client = new ConsulClient(config);
_service = GetAgentService();
return Task.CompletedTask;
}