ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
750 stars 142 forks source link

kvstore: investigate using spf13/afero as a backend #2542

Open bassosimone opened 9 months ago

bassosimone commented 9 months ago

We have a key-value store implementation (./internal/kvstore with model in ./internal/model) that is based either on memory or the file system, with a simple API allowing you to get and set "keys" with []byte "values". The most common use case is getting and setting the engine state using the file system ($HOME/.ooniprobe/engine). However, it is increasingly occurring to me that I would like this interface to have "more powers" including probably the possibility of having subdirectories. While it would be possible to implement this functionality in the existing kvstore, it is also useful to consider a possible alternative, well-written backend with more functionality. To this end, the afero.NewBasePathFs constructor seems a possible interesting candidate.