Skip to content

Commit ac1878d

Browse files
committed
[#3] [add] impl
1 parent 08dc9d0 commit ac1878d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Etcd.Microsoft.Extensions.Configuration/Client/EtcdKeyValueClient.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,14 @@ private void Authenticate(ICredentials credentials)
150150
_userName = credentials.UserName;
151151
}
152152

153-
private IEnumerable<Mvccpb.KeyValue> GetKeys(string prefixKey) => _client.GetRange(prefixKey, GetMetadata()).Kvs;
153+
private IEnumerable<Mvccpb.KeyValue> GetKeys(string prefixKey)
154+
{
155+
// Fix to correct read all keys
156+
if (prefixKey == "\0")
157+
prefixKey = "";
158+
159+
return _client.GetRange(prefixKey, GetMetadata()).Kvs;
160+
}
154161

155162
private IEnumerable<string> GetRoles() =>
156163
_client.UserGet(new AuthUserGetRequest

0 commit comments

Comments
 (0)