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
Currently the only available lockers are fs and memory. It's currently not possible to set a locker via configuration. Providing support for this would allow new datastores to provide their own locking mechanism.
Perhaps updating the Repo initialization to include a locker property would be a good approach:
const repo = new Repo({
locker: require('./my-locker')
})
Then when setting this._locker internally, it could check for either this.options.locker, or the fs|memory keys in this.options.lock
Thanks for bringing this up. I agree there is a good case to make the lock file optional and even avoiding using fs-ext to lock on fs (which causes problems to electron). From my side:
Currently the only available lockers are fs and memory. It's currently not possible to set a locker via configuration. Providing support for this would allow new datastores to provide their own locking mechanism.
Perhaps updating the Repo initialization to include a
locker
property would be a good approach:Then when setting
this._locker
internally, it could check for either this.options.locker, or thefs|memory
keys in this.options.lockconnects to ipfs/js-datastore-s3#1
The text was updated successfully, but these errors were encountered: