diff --git a/modules/tauri/runtime/storage.ts b/modules/tauri/runtime/storage.ts deleted file mode 100644 index 3c546b38..00000000 --- a/modules/tauri/runtime/storage.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Store } from 'tauri-plugin-store-api' -import { createStorage } from 'unstorage' -import redisDriver from 'unstorage/drivers/redis' - -const store = new Store('.servers.dat') - -/** - * TODO: Use redis as storage - * - docs: https://unstorage.unjs.io/drivers/redis - * - then we can probably remove need for `/elk/data` (see docker-compose) - */ -const storage = createStorage({ - driver: redisDriver({ - base: 'unstorage:elk:', - }), -}) - -storage.mount('servers', { - getKeys() { - return store.keys() - }, - async removeItem(key: string) { - await store.delete(key) - }, - clear() { - return store.clear() - }, - hasItem(key: string) { - return store.has(key) - }, - setItem(key: string, value: any) { - return store.set(key, value) - }, - getItem(key: string) { - return store.get(key) - }, -}) - -export function useStorage() { - return storage -}