This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 0792d1d37 docs: Add docs on website for redb service (#3301)
0792d1d37 is described below

commit 0792d1d373c41827caf163cb866763dcc5ef1ba4
Author: Nadeshiko Manju <[email protected]>
AuthorDate: Mon Oct 16 17:09:31 2023 +0800

    docs: Add docs on website for redb service (#3301)
    
    Signed-off-by: Manjusaka <[email protected]>
---
 website/docs/services/redb.mdx | 63 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/website/docs/services/redb.mdx b/website/docs/services/redb.mdx
new file mode 100644
index 000000000..008b3b906
--- /dev/null
+++ b/website/docs/services/redb.mdx
@@ -0,0 +1,63 @@
+---
+title: Redb
+---
+
+[Redb](https://github.com/cberner/redb) services support.
+
+import Docs from '../../../core/src/services/redb/docs.md'
+
+<Docs components={props.components} />
+
+### Via Config
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+<Tabs>
+  <TabItem value="rust" label="Rust" default>
+
+```rust
+use anyhow::Result;
+use opendal::Operator;
+use opendal::Scheme;
+use std::collections::HashMap;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+    let mut config = HashMap::new();
+    config.insert("datadir".to_string(), "/tmp/opendal/redb".to_string());
+
+    let op: Operator = Operator::via_map(Scheme::Redb, config)?;
+    Ok(())
+}
+```
+
+  </TabItem>
+  <TabItem value="node.js" label="Node.js">
+
+```javascript
+import { Operator } from "opendal";
+
+async function main() {
+    const config = {
+        datadir: "/tmp/opendal/redb",
+    };
+    const op = new Operator("redb", config);
+}
+```
+
+  </TabItem>
+  <TabItem value="python" label="Python">
+
+```python
+import opendal
+
+config = {
+    "datadir": "/tmp/opendal/redb",
+}
+
+op = opendal.Operator("redb", **config)
+```
+
+  </TabItem>
+</Tabs>
\ No newline at end of file

Reply via email to