Commit 3ca9cbe 1 parent da7d17d commit 3ca9cbe Copy full SHA for 3ca9cbe
File tree 1 file changed +9
-1
lines changed
src/Etcd.Microsoft.Extensions.Configuration/Client
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Diagnostics ;
2
3
using dotnet_etcd ;
3
4
using dotnet_etcd . interfaces ;
4
5
using Etcd . Microsoft . Extensions . Configuration . Settings ;
6
+ using Grpc . Core ;
5
7
6
8
namespace Etcd . Microsoft . Extensions . Configuration . Client ;
7
9
@@ -38,7 +40,13 @@ public IEtcdClient Create()
38
40
{
39
41
if ( string . IsNullOrEmpty ( Settings . ConnectionString ) )
40
42
throw new EtcdConfigurationException ( "Connection string is missing, should be passed in AddEtcd parameters or set in environment variables." ) ;
43
+ var client = new EtcdClient ( Settings . ConnectionString ) ;
41
44
42
- return new EtcdClient ( Settings . ConnectionString , ssl : Settings . ConnectionString ! . StartsWith ( "https" ) ) ;
45
+ return new EtcdClient ( Settings . ConnectionString , configureChannelOptions : ( options =>
46
+ {
47
+ options . Credentials = Settings . ConnectionString ! . StartsWith ( "https" )
48
+ ? ChannelCredentials . SecureSsl
49
+ : ChannelCredentials . Insecure ;
50
+ } ) ) ;
43
51
}
44
52
}
You can’t perform that action at this time.
0 commit comments