You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://libraries.io/nuget/Etcd.Microsoft.Extensions.Configuration)
Etcdbased configuration provider for Microsoft.Extensions.Configuration.
11
+
Etcd-based configuration provider for Microsoft.Extensions.Configuration.
12
12
13
-
> Keep in mind that starting from v2 it will work only under Windows 10 or Windows Server 2016 (or later) because of internal Grpc client uses HTTP/2 protocol for communication (<https://docs.microsoft.com/en-us/answers/questions/310032/2012-r2-net-core-http2.html>).
13
+
> Keep in mind that starting from v2, it will work only under Windows 10 or Windows Server 2016 (or later) because the internal gRPC client uses the HTTP/2 protocol for communication (<https://docs.microsoft.com/en-us/answers/questions/310032/2012-r2-net-core-http2.html>).
14
14
15
-
## Quick start
15
+
## Quick Start
16
16
17
17
### HTTP
18
18
19
19
```csharp
20
-
varconfig=newConfigurationBuilder()
20
+
varconfig=newConfigurationBuilder()
21
21
.AddEtcd(
22
-
newCredentials("MyEtcdUserName", "passw"),
23
-
newEtcdSettings("http://serveraddress:2379"))
22
+
newCredentials("MyEtcdUserName", "passw"),
23
+
newEtcdSettings("http://serveraddress:2379"))
24
24
.Build();
25
25
26
-
varmySection=config.GetSection("MySection");
27
-
varmyKeyValue=mySection["MyKeyName"];
26
+
varmySection=config.GetSection("MySection");
27
+
varmyKeyValue=mySection["MyKeyName"];
28
28
```
29
29
30
30
### HTTPS
31
31
32
-
When using HTTPS, *.crt CA certificate (should be provided by etcd administrator) should be placed in well known system certificate store (depending on OS).
32
+
When using HTTPS, a *.crt CA certificate (provided by the etcd administrator) should be placed in a well-known system certificate store (depending on the OS).
33
33
34
-
* For Windows it is `Trusted Root Certification Authority`.
35
-
* For Linux, at least for Arch/Manjaro Linux it should be placed in : `/etc/ca-certificates/trust-source/anchors/` followed by `sudo trust extract-compat` command
34
+
* For Windows, it is `Trusted Root Certification Authority`.
35
+
* For Linux, at least for Arch/Manjaro Linux, it should be placed in `/etc/ca-certificates/trust-source/anchors/`, followed by the `sudo trust extract-compat` command.
36
36
37
-
### HTTPS with settings from local JSON file
37
+
### HTTPS with Settings from a Local JSON File
38
38
39
39
appsettings.json
40
40
41
41
```json
42
42
{
43
-
"EtcdSettings":
44
-
{
43
+
"EtcdSettings": {
45
44
"ConnectionString": "https://serveraddress:2379"
46
45
}
47
46
}
48
47
```
49
48
50
49
```csharp
51
50
varjsonConfig=newConfigurationBuilder()
52
-
.AddJsonFile("appsettings.json")
53
-
.Build();
51
+
.AddJsonFile("appsettings.json")
52
+
.Build();
54
53
55
-
varconfig=newConfigurationBuilder()
56
-
.AddEtcd(
57
-
newCredentials("MyEtcdUserName", "passw"),
58
-
newConfigurationBasedEtcdSettings(jsonConfig))
59
-
.Build();
54
+
varconfig=newConfigurationBuilder()
55
+
.AddEtcd(
56
+
newCredentials("MyEtcdUserName", "passw"),
57
+
newConfigurationBasedEtcdSettings(jsonConfig))
58
+
.Build();
60
59
61
60
varmySection=config.GetSection("MySection");
62
61
varmyKeyValue=mySection["MyKeyName"];
@@ -66,7 +65,7 @@ Settings can be mixed from different locations.
66
65
67
66
## Contributing
68
67
69
-
There are many ways in which you can participate in the project. Like most open-source software projects, contributing code is just one of many outlets where you can help improve. Some of the things that you could help out with are:
68
+
There are many ways in which you can participate in the project. Like most open-source software projects, contributing code is just one of many ways you can help improve. Some of the things you could help out with are:
70
69
71
70
* Documentation (both code and features)
72
71
* Bug reports
@@ -79,4 +78,4 @@ There are many ways in which you can participate in the project. Like most open-
79
78
80
79
## License
81
80
82
-
Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
81
+
Licensed under the GNU Lesser General Public License.
0 commit comments