# Microsoft.Extensions.Configuration.Etcd **Repository Path**: vjks_admin/microsoft.-extensions.-configuration.-etcd ## Basic Information - **Project Name**: Microsoft.Extensions.Configuration.Etcd - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-13 - **Last Updated**: 2024-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Microsoft.Extensions.Configuration.Etcd ``` appsettings.json "JwtConfigOptions": { "Issuer": "xxx", "Audience": "xxx", "SecurityKey": "xxxxxxxx5oxxxx5xxxxxszkxxxxdlxxxbxxx" } ``` example: ``` builder.Configuration .AddEtcd("http://127.0.0.1:2379", new EtcdAuth("root", "123456"), "app1/production.json") .Build(); or builder.Configuration .AddEtcd(options => { options.ServiceUrl = "http://127.0.0.1:2379"; options.Auth = new EtcdAuth("root", "123456"); options.Keys.Add("app1/production.json"); }) .Build(); ``` use: ``` private readonly IConfiguration _configuration; public MyConfiguration(IConfiguration configuration) { _configuration = configuration; } public JwtConfigOptions JwtConfig => _configuration.GetSection(nameof(JwtConfigOptions)).Get(); ```