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
Describe the bug
The etcd storage package has no iterator function.
How To Reproduce
Running with the redis storage package iterates as described in the documentation. Running with the etcd storage package throws TypeError: keyv.iterator is not a function.
This code works:
constKeyv=require('keyv');//const keyv = new Keyv('etcd://localhost:2379');constkeyv=newKeyv('redis://localhost:6379');(async()=>{awaitkeyv.set('key1','value1');awaitkeyv.set('key2','value2')awaitkeyv.set('key3','value3');console.log(keyv.iterator());// Return: Object [AsyncGenerator] {}forawait(const[key,value]ofkeyv.iterator()){console.log(key,value);// Return: key and value};keyv.disconnect();})();
Changing to etcd throws the error:
constKeyv=require('keyv');constkeyv=newKeyv('etcd://localhost:2379');//const keyv = new Keyv ('redis://localhost:6379');(async()=>{awaitkeyv.set('key1','value1');awaitkeyv.set('key2','value2')awaitkeyv.set('key3','value3');console.log(keyv.iterator());// TypeError: keyv.iterator is not a functionforawait(const[key,value]ofkeyv.iterator()){console.log(key,value);};keyv.disconnect();})();
The text was updated successfully, but these errors were encountered:
@shcorya - thanks so much for the issue post on this. Currently etcd does not have iteration enabled at the storage adapter layer. We will keep this open as it looks like we can enable this feature.
Describe the bug
The etcd storage package has no iterator function.
How To Reproduce
Running with the redis storage package iterates as described in the documentation. Running with the etcd storage package throws
TypeError: keyv.iterator is not a function
.This code works:
Changing to etcd throws the error:
The text was updated successfully, but these errors were encountered: