Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dragonfly driver #353

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/content/6.drivers/dragonfly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dragonfly

Store data in a [Dragonfly](https://www.dragonflydb.io/) storage using [ioredis](https://github.com/luin/ioredis).

::alert{type="warning"}
Currently, Dragonfly uses the same API and driver as [redis](/drivers/redis).
::

```js
import { createStorage } from "unstorage";
import dragonflyDriver from "unstorage/drivers/dragonfly";

const storage = createStorage({
driver: dragonflyDriver({
base: "unstorage",
host: 'HOSTNAME',
tls: true as any,
port: 6380,
password: 'DRAGONFLY_PASSWORD'
}),
});
```

::alert{type="info"}
For more advanced configurations, follow the same steps as the documentation for the [redis](/drivers/redis) driver.
::
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const builtinDrivers = {
cloudflareKVBinding: "unstorage/drivers/cloudflare-kv-binding",
cloudflareKVHTTP: "unstorage/drivers/cloudflare-kv-http",
cloudflareR2Binding: "unstorage/drivers/cloudflare-r2-binding",
dragonfly: "unstorage/drivers/redis",
fs: "unstorage/drivers/fs",
fsLite: "unstorage/drivers/fs-lite",
github: "unstorage/drivers/github",
Expand Down